Created
May 20, 2011 05:03
-
-
Save ariela/982388 to your computer and use it in GitHub Desktop.
gitにpushしたwebサイトを自動的に同期させる
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 | |
wget -q -O - http://APIのURL |
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
<?php | |
$cmd = dirname(__FILE__) . '/update.sh'; | |
$res = system($cmd); | |
if (false === $res) { | |
echo "NG\n"; | |
} else { | |
echo "OK:{$res}\n"; | |
} |
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 | |
cd /var/www/html/ | |
/usr/bin/git --git-dir=/var/www/html/.git pull |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment