Created
December 15, 2013 08:59
-
-
Save jay16/7970577 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
timestamp = Time.now.strftime("%Y/%m/%d-%H:%M:%S") | |
shell_content =<<SHELL | |
git_path=$(which git) | |
cd /home/work/solife | |
${git_path} init | |
${git_path} add -A . | |
${git_path} commit -a -m "auto commit - #{timestamp}" | |
${git_path} push origin master -f | |
SHELL | |
system(shell_content) | |
#crontab | |
#15 * * * * /home/work/solife/script/crond/git_push.rb > /home/work/solife/script/log/git_push.log 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment