Skip to content

Commit

Permalink
Added update command
Browse files Browse the repository at this point in the history
  • Loading branch information
koenbok committed Oct 17, 2011
1 parent be8b482 commit 2ba9444
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cactus.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def report(self):

if result == 0:
self.log(filePath.replace(self.path, ""))

def main(argv=sys.argv):

def exit():
Expand All @@ -580,10 +580,16 @@ def exit():
print ' build: Rebuild your site from source files'
print ' serve: Serve you website at local development server'
print ' deploy: Upload and deploy your site to S3'
print ''
print 'Or type "cactus.py update" to update to the latest version'
print
sys.exit()

if len(argv) < 3:
if argv[1] == 'update':
print '\n### Updating Cactus to the lastest version ###\n'
os.system('curl -L https://raw.github.com/koenbok/Cactus/master/install.sh | sh')
sys.exit()
exit()

# Handy shortcut for editing in TextMate
Expand Down

0 comments on commit 2ba9444

Please sign in to comment.