Skip to content

Commit

Permalink
closes #42
Browse files Browse the repository at this point in the history
Remove prompt for destructive delete. Since we are echoing the rsync
command line, it's easy to add the `--delete` on a copy and paste.
  • Loading branch information
rappdw committed Feb 22, 2019
1 parent ff044fc commit 579fbd1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions scripts/dock-sync
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ function do-sync-up() {

local RESPONSE
local DESTRUCTIVE=""
echo ""
echo -e "${GREEN}Use 'delete' option with rsync (destructive)? ${RED}enter${GREEN} to bypass, ${RED}y${GREEN} to use 'delete': ${NO_COLOR}"
read RESPONSE
if [ "$RESPONSE" = "y" ]; then DESTRUCTIVE="--delete"; fi
# echo ""
# echo -e "${GREEN}Use 'delete' option with rsync (destructive)? ${RED}enter${GREEN} to bypass, ${RED}y${GREEN} to use 'delete': ${NO_COLOR}"
# read RESPONSE
# if [ "$RESPONSE" = "y" ]; then DESTRUCTIVE="--delete"; fi

echo rsync -azq ${DESTRUCTIVE} ${HAS_DOCKERIGNORE:+--filter=":- .dockerignore"} -e "ssh -o LogLevel=error -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" $1 $2
rsync -azq ${DESTRUCTIVE} \
Expand All @@ -39,10 +39,10 @@ function do-sync-down() {

local RESPONSE
local DESTRUCTIVE=""
echo ""
echo -e "${GREEN}Use 'delete' option with rsync (destructive)? ${RED}enter${GREEN} to bypass, ${RED}y${GREEN} to use 'delete': ${NO_COLOR}"
read RESPONSE
if [ "$RESPONSE" = "y" ]; then DESTRUCTIVE="--delete"; fi
# echo ""
# echo -e "${GREEN}Use 'delete' option with rsync (destructive)? ${RED}enter${GREEN} to bypass, ${RED}y${GREEN} to use 'delete': ${NO_COLOR}"
# read RESPONSE
# if [ "$RESPONSE" = "y" ]; then DESTRUCTIVE="--delete"; fi

echo rsync -azq ${DESTRUCTIVE} ${HAS_DOCKERIGNORE:+--filter=".- .dockerignore"} ${3:+--exclude=$3} -e "ssh -o LogLevel=error -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" $1 $2
rsync -azq ${DESTRUCTIVE} \
Expand Down

0 comments on commit 579fbd1

Please sign in to comment.