mirror of
https://gitlab.com/ProcyonLotor/vrchat-template.git
synced 2026-08-25 10:43:53 +05:00
Updated old shell scripts
This commit is contained in:
@@ -1,30 +1,18 @@
|
||||
#!/bin/sh
|
||||
#!/bin/sh -e
|
||||
|
||||
me="$(realpath "$0")"
|
||||
repository="$(dirname "$me")/."
|
||||
repository="$(dirname "$(readlink -f "$0")")/."
|
||||
|
||||
# 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
|
||||
cd "${repository}"
|
||||
git rev-parse --is-inside-work-tree >/dev/null
|
||||
|
||||
git clean -dfX --dry-run "${repository}"
|
||||
|
||||
printf "Execute [Y,N]?"; read -r yn
|
||||
if [ "$yn" = "${yn#[Yy]}" ] ;then
|
||||
printf "\nExecute [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
|
||||
|
||||
Reference in New Issue
Block a user