mirror of
https://gitlab.com/ProcyonLotor/vrchat-template.git
synced 2026-08-25 10:43:53 +05:00
Updated shell scripts again
This commit is contained in:
@@ -5,13 +5,14 @@ SETLOCAL
|
|||||||
CD "%~dp0"
|
CD "%~dp0"
|
||||||
git rev-parse --is-inside-work-tree >NUL || GOTO die
|
git rev-parse --is-inside-work-tree >NUL || GOTO die
|
||||||
|
|
||||||
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
|
git diff --name-only HEAD
|
||||||
|
|
||||||
ECHO.
|
ECHO.
|
||||||
CHOICE /M "Execute"
|
CHOICE /M "Execute"
|
||||||
IF %ERRORLEVEL% NEQ 1 (
|
IF %ERRORLEVEL% NEQ 1 (
|
||||||
ECHO Aborting restore...
|
ECHO Aborting discard...
|
||||||
) ELSE (
|
) ELSE (
|
||||||
git restore "%~dp0." || GOTO die
|
git restore "%~dp0." || GOTO die
|
||||||
ECHO Done.
|
ECHO Done.
|
||||||
|
|||||||
@@ -5,12 +5,13 @@ repository="$(dirname "$(readlink -f "$0")")/."
|
|||||||
cd "${repository}"
|
cd "${repository}"
|
||||||
git rev-parse --is-inside-work-tree >/dev/null
|
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
|
git diff --name-only HEAD
|
||||||
|
|
||||||
printf "\nExecute [Y,N]?"; read -r yn
|
printf "\nExecute [Y,N]?"; read -r yn
|
||||||
if [ "$yn" = "${yn#[Yy]}" ]; then
|
if [ "$yn" = "${yn#[Yy]}" ]; then
|
||||||
echo "Aborting restore..."
|
echo "Aborting discard..."
|
||||||
else
|
else
|
||||||
git restore "${repository}"
|
git restore "${repository}"
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|||||||
@@ -11,15 +11,24 @@ IF NOT DEFINED upstream (
|
|||||||
GOTO die
|
GOTO die
|
||||||
)
|
)
|
||||||
|
|
||||||
|
git fetch --all || GOTO die
|
||||||
|
|
||||||
|
ECHO.
|
||||||
ECHO Going to reset current branch to: %upstream%
|
ECHO Going to reset current branch to: %upstream%
|
||||||
ECHO *** WARNING: All local changes and commits will be lost!
|
|
||||||
|
ECHO.
|
||||||
|
ECHO *** WARNING: These local commits will be lost:
|
||||||
|
git log "%upstream%..HEAD" --oneline
|
||||||
|
|
||||||
|
ECHO.
|
||||||
|
ECHO *** WARNING: These local files will be reset:
|
||||||
|
git diff "HEAD..%upstream%" --name-only
|
||||||
|
|
||||||
ECHO.
|
ECHO.
|
||||||
CHOICE /M "Execute"
|
CHOICE /M "Execute"
|
||||||
IF %ERRORLEVEL% NEQ 1 (
|
IF %ERRORLEVEL% NEQ 1 (
|
||||||
ECHO Aborting reset...
|
ECHO Aborting reset...
|
||||||
) ELSE (
|
) ELSE (
|
||||||
git fetch --all || GOTO die
|
|
||||||
git reset --hard "%upstream%" || GOTO die
|
git reset --hard "%upstream%" || GOTO die
|
||||||
ECHO Done.
|
ECHO Done.
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,8 +9,16 @@ if [ -z "$upstream" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
echo "Going to reset current branch to: ${upstream}"
|
echo "Going to reset current branch to: ${upstream}"
|
||||||
echo "*** WARNING: All local changes and commits will be lost!"
|
|
||||||
|
echo ""
|
||||||
|
echo "*** WARNING: These local commits will be lost:"
|
||||||
|
git log "${upstream}..HEAD" --oneline
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "*** WARNING: These local files will be reset:"
|
||||||
|
git diff "HEAD..${upstream}" --name-only
|
||||||
|
|
||||||
printf "\nExecute [Y,N]?"; read -r yn
|
printf "\nExecute [Y,N]?"; read -r yn
|
||||||
if [ "$yn" = "${yn#[Yy]}" ]; then
|
if [ "$yn" = "${yn#[Yy]}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user