Created
December 31, 2015 12:31
-
-
Save z3ntu/d0bab1879895b5a12abc to your computer and use it in GitHub Desktop.
Script for updating programs with the source code from git repositories.
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 | |
# Script by github.com/z3ntu | |
for dir in */; do | |
echo "Updating $dir." | |
cd $dir | |
output="$(git pull)" | |
if [ "$output" != 'Already up-to-date.' ]; then | |
if [ -x "build.sh" ]; then | |
echo "Running buid.sh." | |
./build.sh | |
else | |
echo "build.sh was not found in subdirectory $dir" | |
fi | |
else | |
echo "Already up-to date." | |
fi | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment