Created
February 8, 2011 21:07
-
-
Save sivy/817247 to your computer and use it in GitHub Desktop.
How I update my github wiki
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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