Created
April 9, 2013 01:24
-
-
Save wokamoto/5342149 to your computer and use it in GitHub Desktop.
特定のディレクトリに移動して git pull するためのシェルスクリプト
This file contains hidden or 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 | |
if [ $# -ne 0 ]; then | |
DIRNAME=$1 | |
else | |
while : | |
do | |
echo -n "please input virtual host dir: " | |
read DIRNAME | |
if [ "$DIRNAME" != ""]; then | |
break; | |
fi | |
done | |
fi | |
if [ -d $DIRNAME ]; then | |
cd "$DIRNAME" | |
if git pull; then | |
exit 0 | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment