Updated .gitattributes and .gitignore, added cleanup scripts

This commit is contained in:
raccoon
2025-01-09 00:38:27 +05:00
parent a66355a13a
commit 5132eb74bf
5 changed files with 112 additions and 25 deletions

30
repo-cleanup.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
me="$(realpath "$0")"
repository="$(dirname "$me")/."
# I have no mouth but i must scream
if [ ! -t 0 ]; then
if command -v x-terminal-emulator >/dev/null 2>&1; then
x-terminal-emulator -e "$me"
elif command -v xdg-terminal >/dev/null 2>&1; then
xdg-terminal "$me"
else
echo "Run me from the fucking terminal!" >"${me}.README"
exit 1
fi
exit 0
fi
git clean -dfX --dry-run "${repository}"
printf "Execute [Y,N]?"; read -r yn
if [ "$yn" = "${yn#[Yy]}" ] ;then
echo "Aborting cleanup..."
else
git clean -dfX "${repository}"
echo "Done."
fi
printf "Press any key to continue..."; read -r _
exit 0