Last active
December 14, 2015 13:11
-
-
Save sakadon/68e7118eb2419d945da1 to your computer and use it in GitHub Desktop.
指定されたディレクトリ内部でgit pullするのをディレクトリ分、繰り返すshell script ref: http://qiita.com/sakadon/items/3aded92edc5867dbb0a5
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/bash | |
set -eu | |
nowdate=`date "+%Y/%m/%d %T"` | |
host=`hostname -f` | |
echo -e '!!start git pull carnival!!' | ./slack.sh | |
find /var/www/html -mindepth 1 -maxdepth 1 -type d | while read FILE | |
do | |
echo '----------' | |
echo 'find: '${FILE} | |
cd ${FILE} | |
pwdmsg=$(pwd) | |
gitmsg=$(git pull) | |
slackpost=${pwdmsg}'\n'${gitmsg} | |
echo -e ${slackpost} | ./slack.sh | |
done | |
echo -e '!!done git pull carnival!!' | ./slack.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment