Last active
September 28, 2018 00:20
-
-
Save davidmroth/8ef935afe09e4bf297fdb6ec37f5f70f to your computer and use it in GitHub Desktop.
Check for local git changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SCAN_FOLDERS="theme $(find plugins/ -maxdepth 1 -type d)" | |
for folder in $SCAN_FOLDERS; do | |
if test -e $folder/.git; then | |
echo "Checking $folder for changes..." | |
hascommit=$(cd $folder; test -z "$(git status --porcelain)" || echo yes); | |
if test ! -z "$hascommit"; then | |
echo -e "\t$folder has changes!" | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment