2022-08-16 17:37:20 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
FILE="../patches/${1}.patch"
|
|
|
|
|
|
|
|
cd vscode || { echo "'vscode' dir not found"; exit 1; }
|
|
|
|
|
2022-09-25 08:54:41 -04:00
|
|
|
git add .
|
|
|
|
git reset -q --hard HEAD
|
|
|
|
|
2022-09-30 02:44:14 -04:00
|
|
|
if [[ -f "${FILE}" ]]; then
|
2022-09-27 14:14:27 -04:00
|
|
|
git apply --reject "${FILE}"
|
|
|
|
fi
|
2022-08-16 17:37:20 -04:00
|
|
|
|
|
|
|
read -p "Press any key when the conflict have been resolved..." -n1 -s
|
|
|
|
|
|
|
|
git diff -U1 > "${FILE}"
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "The patch has been generated."
|