Last active
April 25, 2023 08:40
-
-
Save pasdam/b30d7658cfeb3a49ec2e7e3f3aa47415 to your computer and use it in GitHub Desktop.
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/sh | |
DIR=$1 | |
if [ -z "$DIR" ]; then | |
DIR=./ | |
fi | |
if [ ! -d "$DIR" ]; then | |
1>&2 echo "Invalid dir: $DIR" | |
exit 1 | |
fi | |
echo "Processing files in $DIR" | |
cd $DIR | |
for i in *; do | |
echo "" | |
echo "============================================" | |
echo "Pulling: $i" | |
cd $i | |
git pull | |
git fetch --prune origin | |
cd $DIR | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment