質問: $? ] then echo "empty" # logic to follow else { git pull } &> /dev/null echo "don't forget to rebase!!!" echo $repo_path fi # check for changes to master # if master is behind origin/master # then pull master and notify me to rebase # run this at the start of the day (this script should be run from my start_work # script and should also be periodically run throughout the day. [maybe every # time i'm about to run coverage/push?]) 誰かアイデアはありますか?
回答: 終了ステータスを確認する代わりに、実際の出力を確認できます。例えばgit fetch &> /dev/null diffs=$(git diff master origin/master) if [ -z "$diffs" ] then echo "empty"