有修改内容时,可以按 y 继续执行
This commit is contained in:
parent
2ad1d5d3b9
commit
63cbffbe6a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue