sudo apt-get install parallel
bash <(curl -s https://gist.githubusercontent.com/ArnaudD/40f153aa93920bd56f90/raw/update-scripts.sh)
Last active
April 13, 2016 09:29
-
-
Save ArnaudD/40f153aa93920bd56f90 to your computer and use it in GitHub Desktop.
scripts for managing several 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 | |
parallel --no-notice git -C ::: `ls fizix-* -d` ::: fetch | |
BOLD='\e[1m' | |
BLUE='\e[34m' | |
YELLOW='\e[93m' | |
RESET='\e[0m' | |
for dir in `ls */ -d`; do | |
branch=$(git -C $dir symbolic-ref --short -q HEAD) | |
echo -e "$BOLD$BLUE$dir $YELLOW($branch)$RESET" | |
# git -C $dir status | |
git -C $dir merge --ff-only | |
done |
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 | |
parallel --no-notice git -C ::: `ls fizix-* -d` ::: push |
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 | |
node_projects=`ls fizix-*/package.json | xargs dirname` | |
parallel --no-notice npm --prefix ::: $node_projects ::: install |
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 | |
node_projects=`ls fizix-*/package.json | xargs dirname` | |
packages=`ls */node_modules/@fizix/* -d | xargs basename -a | sort | uniq | sed 's/^/\@fizix\//'` | |
parallel --eta --no-notice npm --prefix ::: $node_projects ::: update ::: $packages |
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 | |
curl -s https://gist.githubusercontent.com/ArnaudD/40f153aa93920bd56f90/raw/git-pull.sh > git-pull.sh | |
curl -s https://gist.githubusercontent.com/ArnaudD/40f153aa93920bd56f90/raw/git-push.sh > git-push.sh | |
curl -s https://gist.githubusercontent.com/ArnaudD/40f153aa93920bd56f90/raw/npm-install.sh > npm-install.sh | |
curl -s https://gist.githubusercontent.com/ArnaudD/40f153aa93920bd56f90/raw/update-scripts.sh > update-scripts.sh | |
curl -s https://gist.githubusercontent.com/ArnaudD/40f153aa93920bd56f90/raw/npm-update.sh > npm-update.sh | |
chmod u+x *.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment