Skip to content

Instantly share code, notes, and snippets.

@dannyroberts
Last active December 16, 2015 06:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannyroberts/5391823 to your computer and use it in GitHub Desktop.
Save dannyroberts/5391823 to your computer and use it in GitHub Desktop.
function delete-pyc() {
find . -name '*.pyc' -delete
}
function pull-latest-master() {
git checkout master; git pull origin master
git submodule update --init
git submodule foreach --recursive 'git checkout master; git pull origin master &'
until [ -z "$(ps aux | grep '[g]it pull')" ]; do sleep 1; done
}
function update-code() {
pull-latest-master
delete-pyc
}
@kennknowles
Copy link

Try GNU parallel

@dannyroberts
Copy link
Author

to run:

$ source update-code.sh
$ update-code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment