Last active
August 29, 2015 14:07
-
-
Save gitzhou/879fe42226af29b7f170 to your computer and use it in GitHub Desktop.
fetch-src-push-github.sh
This file contains 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 | |
fetch_dir="/home/aaron67/prj/FetchLeetcodeSubmission/release" | |
src_dir="/home/aaron67/prj/leetcode-oj-submissions" | |
# 更新 | |
cd $src_dir | |
/usr/bin/git pull | |
# 抓取 | |
cd $fetch_dir | |
/usr/bin/git pull | |
/usr/bin/java -jar FetchLeetcodeSubmission.jar | |
# 提交 | |
push_comment="`date +%F`" | |
cd $src_dir | |
/usr/bin/git add . | |
/usr/bin/git commit -a -m "$push_comment" | |
/usr/bin/git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment