Skip to content

Commit

Permalink
terminate if there are no changes
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jan 19, 2013
1 parent ab82c84 commit f9a4952
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions image_optim.sh
Expand Up @@ -55,9 +55,16 @@ make_sure_we_are_safe()

git_commit()
{
status=`git status --porcelain`
if [ ! -z "${status}" ] ; then
date=`date`
git status
git commit -a -m "image_optim $date"
else # no changes
timeendglobal
echo "Script terminated successfully."
exit
fi

}

Expand Down

0 comments on commit f9a4952

Please sign in to comment.