Hired an ol' salty dog to run the ship
This commit is contained in:
parent
d68ae6cd72
commit
c64eb7e583
1 changed files with 2 additions and 3 deletions
5
ship
5
ship
|
@ -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
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue