Skip to content

Commit

Permalink
ops(update.sh): add choices
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonymousWP committed Apr 18, 2023
1 parent d17c0ac commit 8500c5b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
#!/bin/bash

make down && git pull && make build && make up
echo "Do you want to apply your local changes after updating? (y/n)"
read answer

if [[ $answer == "y" ]]; then
make down && git stash save && git pull && git stash apply && make build && make up
elif [[ $answer == "n" ]]; then
make down && git stash && git stash drop && git pull && make build && make up
else
echo "Invalid input. Please enter 'y' or 'n'."
fi

0 comments on commit 8500c5b

Please sign in to comment.