Skip to content

Commit

Permalink
fix the bash script to do as expected with the prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeis committed Jun 4, 2015
1 parent 4826522 commit e76a331
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions generate_api_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ mv build/docs/api/py docs/api/py

git add -A docs/api

echo "Do you want to commit the changes? (Y/n):"
read -p "Do you want to commit the chages? (Y/n):" changes </dev/tty

read changes

if [ $changes != "" || $changes != "Y" || $changes != "y" ]
then
exit;
if [ -z $changes ]; then
changes=Y
fi

case "$changes" in
Y|y) echo "";;
N|n) exit;;
*) exit;;
esac

echo "Commiting changes"
git commit -am "updating javadoc and py docs"

Expand Down

0 comments on commit e76a331

Please sign in to comment.