Created
July 2, 2014 03:16
-
-
Save hinovana/b26b963f26bfffeaebcf to your computer and use it in GitHub Desktop.
コマンドの実行が終わったらYOをするシェルスクリプト
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 | |
# | |
# コマンドの実行が終わったらYOをするシェルスクリプト | |
# | |
# (1) APIユーザを作ってトークンを取得する | |
# http://yoapi.justyo.co/ | |
# | |
# (2) APIユーザをフォローする | |
# APIユーザと普通のユーザは別なので気をつけて | |
# | |
# (3) コマンドを打つ | |
# YO_API_TOKEN=hogehoge yoall phpunit app/tests/functional/comments_test.php | |
# | |
# (4) YO!! | |
# | |
if test ${YO_API_TOKEN:-""} = "" | |
then | |
echo "usage: | |
YO_API_TOKEN={YOUR_YO_API_TOKEN} $0 EXEC_COMMAND" | |
exit -1 | |
else | |
"$@" | |
curl http://api.justyo.co/yoall/ -X POST -d "api_token=${YO_API_TOKEN}" > /dev/null 2>&1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment