Skip to content

Instantly share code, notes, and snippets.

@tonycwliu
Created September 7, 2012 08:30
Show Gist options
  • Select an option

  • Save tonycwliu/3664355 to your computer and use it in GitHub Desktop.

Select an option

Save tonycwliu/3664355 to your computer and use it in GitHub Desktop.
This script help to update your Octopress blog by a single commend
#!/bin/sh
# This script help to update your Octopress blog by a single commend
# USAGE: sh blog.sh {your comment of this commitment}
# If no comment for this updating, simply say `Updating'
if [ $# -lt 1 ]; then
commit_note=\'Updating.\'
else
commit_note=\'$1\'
fi
# Convert the markdown language files to html
echo 'rake generate'
rake generate
# Commit and push (update) files under current directory
# to a branch name master on Heroku by git.
echo 'git add .'
git add .
echo 'git commit -m $commit_note'
git commit -m $commit_note
echo 'git push heroku master'
git push heroku master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment