Skip to content

Instantly share code, notes, and snippets.

@wokamoto
Created April 9, 2013 01:24
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wokamoto/5342149 to your computer and use it in GitHub Desktop.
Save wokamoto/5342149 to your computer and use it in GitHub Desktop.
特定のディレクトリに移動して git pull するためのシェルスクリプト
#!/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