Updated shell scripts again

This commit is contained in:
raccoon
2026-07-25 02:21:16 +05:00
parent 50947a0def
commit d0fac4ebfb
4 changed files with 26 additions and 7 deletions

View File

@@ -5,12 +5,13 @@ repository="$(dirname "$(readlink -f "$0")")/."
cd "${repository}"
git rev-parse --is-inside-work-tree >/dev/null
echo "The following files were changed and will be reverted:"
echo ""
echo "*** WARNING: The following files were changed and will be reverted:"
git diff --name-only HEAD
printf "\nExecute [Y,N]?"; read -r yn
if [ "$yn" = "${yn#[Yy]}" ]; then
echo "Aborting restore..."
echo "Aborting discard..."
else
git restore "${repository}"
echo "Done."