Skip to content

Instantly share code, notes, and snippets.

@Kikobeats
Created September 12, 2014 15:00
Show Gist options
  • Save Kikobeats/efb16833cd73f437d78c to your computer and use it in GitHub Desktop.
Save Kikobeats/efb16833cd73f437d78c to your computer and use it in GitHub Desktop.
BASH Script for update a list of repositories
#!/bin/bash -x
welcome() {
echo " _ _____________ ___ _____ _____ "
echo "| | | | ___ \ _ \/ _ \_ _| ___|"
echo "| | | | |_/ / | | / /_\ \| | | |__ "
echo "| | | | __/| | | | _ || | | __| "
echo "| |_| | | | |/ /| | | || | | |___ "
echo " \___/\_| |___/ \_| |_/\_/ \____/"
echo
}
update() {
ORIG="$PWD"
COUNT=1
for repo in "$@"
do
echo "## Updating $repo... [$COUNT/$#]"
cd "$ORIG"
cd "$repo"
git pull origin master
(( COUNT += 1 ))
echo
done
}
## Main
welcome
### update
update \
sails \
sailor \
sailor-client \
sailor-errorify \
sailor-scripts \
sailor-translate \
sailor-validator \
sailor-module-user \
sailor-module-lastfm \
sailor-module-mandrill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment