diff --git a/deploy-gh-pages.sh b/deploy-gh-pages.sh index 6552a3c6c..10d0f92c4 100755 --- a/deploy-gh-pages.sh +++ b/deploy-gh-pages.sh @@ -6,8 +6,13 @@ if [ -z "$(git status --porcelain)" ]; then echo "Working directory clean" else # Uncommitted changes - echo "Skiped: You got uncommitted changes" - exit + read -p "You got uncommitted changes, press y to continue? " -n 1 -r + echo # (optional) move to a new line + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo "Skiped!" + [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 # handle exits from shell or function but don't exit interactive shell + fi fi rm -rf gh-pages