1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/usr/bin/env bash set -e SUGGESTION="${SUGGESTION:-sync the vendor.conf and commit all changes.}" STATUS=$(git status --porcelain) if [[ -z $STATUS ]] then echo "tree is clean" else echo "tree is dirty, please $SUGGESTION" echo "" echo "$STATUS" exit 1 fi