Created
October 31, 2018 10:10
-
-
Save davidmroth/0a2293eb1fa4597a1b18948b09b5af56 to your computer and use it in GitHub Desktop.
Check folders for 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 | |
ROOT_FOLDERS="WordpressSiteSync theme $(find plugins/ -maxdepth 1 -type d)" | |
for folder in $ROOT_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