Skip to content

Instantly share code, notes, and snippets.

@mcrmonkey
Created October 31, 2017 23:22
Show Gist options
  • Save mcrmonkey/49c70bacf00b137e18c162d85a9832cd to your computer and use it in GitHub Desktop.
Save mcrmonkey/49c70bacf00b137e18c162d85a9832cd to your computer and use it in GitHub Desktop.
cycle through a bunch of repos and update them
#!/bin/bash
BLUE="\033[01;34m"
GREEN="\033[01;32m"
RED="\033[01;31m"
YELLO="\033[01;33m"
NORM="\033[00m"
for R in $(find * -maxdepth 0 -type d)
do
(
echo -ne "$BLUE $R \n $NORM\n"
cd $R
for I in $(find * -maxdepth 0 -type d)
do
(
cd $I
echo -ne "\t $I $NORM "
git pull >/dev/null 2>&1 && echo -ne "\r [$GREEN OK $NORM]\n" || echo -ne "\r [$RED ER $NORM]\n\n"
)
done
echo -ne "\n\n"
)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment