Hired an ol' salty dog to run the ship

This commit is contained in:
Josh Sherman 2014-12-05 11:17:41 -05:00
parent d68ae6cd72
commit c64eb7e583

5
ship
View file

@ -5,7 +5,7 @@ case $# in
# TODO go up the hierarchy to find .ship # TODO go up the hierarchy to find .ship
source .ship source .ship
ssh $SERVER " ssh captain@$SERVER "
cd $DESTINATION cd $DESTINATION
git pull origin master git pull origin master
" "
@ -18,14 +18,13 @@ case $# in
DESTINATION=$3 DESTINATION=$3
CLONEURL=`git config --get remote.origin.url` CLONEURL=`git config --get remote.origin.url`
ssh $SERVER " ssh captain@$SERVER "
if [ -a $DESTINATION ] if [ -a $DESTINATION ]
then then
echo "Error: Destination exists" echo "Error: Destination exists"
exit 1 exit 1
else else
git clone $CLONEURL $DESTINATION git clone $CLONEURL $DESTINATION
chgrp ship -R $DESTINATION
fi fi
" "