Skip to content

Instantly share code, notes, and snippets.

@sivy
Created February 8, 2011 21:07
Show Gist options
  • Select an option

  • Save sivy/817247 to your computer and use it in GitHub Desktop.

Select an option

Save sivy/817247 to your computer and use it in GitHub Desktop.
How I update my github wiki
#!/usr/bin/env perl
###
# I have a github wiki wired up to my Notational Velocity file system data store
# It's an amusink little gizmo
#
my $USER='steve';
my $status= `cd /Users/$USER/Library/Application\\ Support/Notational\\ Data/; /usr/local/git/bin/git status`;
if ($status =~ /modified|untracked\ files\ present|deleted/) {
my $out = `cd /Users/$USER/Library/Application\\ Support/Notational\\ Data/; /usr/local/git/bin/git add .; /usr/local/git/bin/git commit -a -m "NV Wiki Update"; /usr/local/git/bin/git push;`;
`/usr/local/bin/growlnotify 'NV Wiki Update' -m "Your Notes Wiki was updated:\n$out"`;
} else {
print "NV Wiki Update: No update needed.\n"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment