Created
September 7, 2012 08:30
-
-
Save tonycwliu/3664355 to your computer and use it in GitHub Desktop.
This script help to update your Octopress blog by a single commend
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
| #!/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