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:
@@ -2,13 +2,17 @@
|
|||||||
TITLE Clean up Unity Project repo
|
TITLE Clean up Unity Project repo
|
||||||
SETLOCAL EnableDelayedExpansion
|
SETLOCAL EnableDelayedExpansion
|
||||||
|
|
||||||
CALL :cleanup --dry-run || GOTO die
|
CD "%~dp0"
|
||||||
|
git rev-parse --is-inside-work-tree >NUL || GOTO die
|
||||||
|
|
||||||
|
git clean -dfX --dry-run "%~dp0." || GOTO die
|
||||||
|
|
||||||
|
ECHO.
|
||||||
CHOICE /M "Execute"
|
CHOICE /M "Execute"
|
||||||
IF !ERRORLEVEL! NEQ 1 (
|
IF !ERRORLEVEL! NEQ 1 (
|
||||||
ECHO Aborting cleanup...
|
ECHO Aborting cleanup...
|
||||||
) ELSE (
|
) ELSE (
|
||||||
CALL :cleanup || GOTO die
|
git clean -dfX "%~dp0." || GOTO die
|
||||||
ECHO Done.
|
ECHO Done.
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -19,8 +23,3 @@ EXIT /B 0
|
|||||||
:die
|
:die
|
||||||
PAUSE
|
PAUSE
|
||||||
EXIT /B %ERRORLEVEL%
|
EXIT /B %ERRORLEVEL%
|
||||||
|
|
||||||
|
|
||||||
:cleanup
|
|
||||||
git clean -dfX %* "%~dp0." || EXIT /B
|
|
||||||
EXIT /B 0
|
|
||||||
|
|||||||
@@ -1,24 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
|
|
||||||
me="$(realpath "$0")"
|
repository="$(dirname "$(readlink -f "$0")")/."
|
||||||
repository="$(dirname "$me")/."
|
|
||||||
|
|
||||||
# I have no mouth but i must scream
|
cd "${repository}"
|
||||||
if [ ! -t 0 ]; then
|
git rev-parse --is-inside-work-tree >/dev/null
|
||||||
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}"
|
git clean -dfX --dry-run "${repository}"
|
||||||
|
|
||||||
printf "Execute [Y,N]?"; read -r yn
|
printf "\nExecute [Y,N]?"; read -r yn
|
||||||
if [ "$yn" = "${yn#[Yy]}" ]; then
|
if [ "$yn" = "${yn#[Yy]}" ]; then
|
||||||
echo "Aborting cleanup..."
|
echo "Aborting cleanup..."
|
||||||
else
|
else
|
||||||
@@ -26,5 +15,4 @@ else
|
|||||||
echo "Done."
|
echo "Done."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Press any key to continue..."; read -r _
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user