|
|
|
|
|
|
|
|
then |
|
|
then |
|
|
echo "Running App Sync (dry-run)" |
|
|
echo "Running App Sync (dry-run)" |
|
|
rsync --dry-run -az --force --delete --progress --exclude-from=.rsyncignore ./ $USER@$SERVER:$DIR; |
|
|
rsync --dry-run -az --force --delete --progress --exclude-from=.rsyncignore ./ $USER@$SERVER:$DIR; |
|
|
|
|
|
elif [[ $2 == "ssh" ]] |
|
|
|
|
|
then |
|
|
|
|
|
echo "entering server" |
|
|
|
|
|
ssh -t $USER@$SERVER "cd $LIVE_DIR; bash --login"; |
|
|
elif [[ $2 == "go" ]] |
|
|
elif [[ $2 == "go" ]] |
|
|
then |
|
|
then |
|
|
echo "Running App Sync" |
|
|
echo "Running App Sync" |
|
|
|
|
|
|
|
|
echo "Uploading Content" |
|
|
echo "Uploading Content" |
|
|
rsync -azv --progress --exclude-from=.rsyncignore ./$CONTENT $USER@$SERVER:$DIR$CONTENT; |
|
|
rsync -azv --progress --exclude-from=.rsyncignore ./$CONTENT $USER@$SERVER:$DIR$CONTENT; |
|
|
echo "done" |
|
|
echo "done" |
|
|
|
|
|
elif [[ $4 == "del" ]] |
|
|
|
|
|
then |
|
|
|
|
|
if [[ -z $5 ]] |
|
|
|
|
|
then |
|
|
|
|
|
echo "Uploading Content, deleting remotes that don't occur locally (dry-run)" |
|
|
|
|
|
rsync --dry-run -azv --progress --delete --exclude-from=.rsyncignore ./$CONTENT $USER@$SERVER:$DIR$CONTENT; |
|
|
|
|
|
echo "done" |
|
|
|
|
|
elif [[ $5 == "go" ]] |
|
|
|
|
|
then |
|
|
|
|
|
echo "Uploading Content, deleting remotes that don't occur locally" |
|
|
|
|
|
rsync -azv --progress --delete --exclude-from=.rsyncignore ./$CONTENT $USER@$SERVER:$DIR$CONTENT; |
|
|
|
|
|
echo "done" |
|
|
|
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |