Skip to content

Instantly share code, notes, and snippets.

@blech
Last active December 19, 2015 04:29
Show Gist options
  • Save blech/5897825 to your computer and use it in GitHub Desktop.
Save blech/5897825 to your computer and use it in GitHub Desktop.
Update all checked out gists

If you've used mbostock's gist to pull all the gists you own into a folder, then this ridiculously hackish bit of shell will update them all.

If, unlike me, you actually have git up working properly, you'll be able to remove the - in line 6.

#!/bin/bash
for var in `ls -l | egrep '^d' | grep -v 'bbprojectd' | sed 's/^.* //'`;
do echo "$var";
cd "$var";
echo `git-up`;
cd ..;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment