Skip to content

Instantly share code, notes, and snippets.

@gitzhou
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gitzhou/879fe42226af29b7f170 to your computer and use it in GitHub Desktop.
Save gitzhou/879fe42226af29b7f170 to your computer and use it in GitHub Desktop.
fetch-src-push-github.sh
#!/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