SITKA Public Git
/
sitka
/
sitka-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b074e2
)
deployfile.sh: be smarter about file ownership etc when deploying with rsync
author
Jeff Davis
<jdavis@sitka.bclibraries.ca>
Fri, 25 Sep 2015 19:51:38 +0000
(12:51 -0700)
committer
Jeff Davis
<jdavis@sitka.bclibraries.ca>
Fri, 25 Sep 2015 19:51:38 +0000
(12:51 -0700)
deployment/deployfile.sh
patch
|
blob
|
blame
|
history
diff --git
a/deployment/deployfile.sh
b/deployment/deployfile.sh
index
c430750
..
b76dd9b
100755
(executable)
--- a/
deployment/deployfile.sh
+++ b/
deployment/deployfile.sh
@@
-80,8
+80,10
@@
fi
if [[ -z "$USER" ]]
then
SSH="ssh"
+ RSYNC_OPTS="-avz"
else
SSH="ssh -l${USER}"
+ RSYNC_OPTS="-rlpD --chown=${USER}:${USER}"
fi
if [[ -z "$PROD" ]]
@@
-98,5
+100,5
@@
do
if [[ -z "$VERBOSE" ]]; then
echo -e "$HOST:\n\tFILE=$FILE\n\tDEST=$DEST\n\tUSER=$USER\n\tBACKUP=$BACKUP\n\tSSH=$SSH\n\tRSYNC_DEST=$RSYNC_DEST\n\tAUTOPATH=$AUTOPATH\n\tAUTODEST=$AUTODEST\n"
fi
- rsync -e"${SSH}" $BACKUP
-avz
$FILE $RSYNC_DEST
+ rsync -e"${SSH}" $BACKUP
$RSYNC_OPTS
$FILE $RSYNC_DEST
done