From 12f35a574157525eb4fbc4a972129e0ee37b0b7b Mon Sep 17 00:00:00 2001 From: squaresun <5quar3sun@gmail.com> Date: Fri, 2 Mar 2018 18:05:40 +0800 Subject: [PATCH] add param PLUGIN_CHMOD --- upload.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/upload.sh b/upload.sh index bc83d62..62e3491 100755 --- a/upload.sh +++ b/upload.sh @@ -26,6 +26,12 @@ if [ -z "$PLUGIN_SRC_DIR" ]; then PLUGIN_SRC_DIR="/" fi +if [ -z "$PLUGIN_CHMOD" ]; then + PLUGIN_CHMOD="" +else + PLUGIN_CHMOD="-p" +fi + PLUGIN_EXCLUDE_STR="" PLUGIN_INCLUDE_STR="" @@ -44,5 +50,5 @@ lftp -e "set xfer:log 1; \ set ftp:ssl-protect-data $PLUGIN_SECURE; \ set ssl:verify-certificate $PLUGIN_VERIFY; \ set ssl:check-hostname $PLUGIN_VERIFY; \ - mirror --verbose -p -R $PLUGIN_INCLUDE_STR $PLUGIN_EXCLUDE_STR $(pwd)$PLUGIN_SRC_DIR $PLUGIN_DEST_DIR" \ + mirror --verbose $PLUGIN_CHMOD -R $PLUGIN_INCLUDE_STR $PLUGIN_EXCLUDE_STR $(pwd)$PLUGIN_SRC_DIR $PLUGIN_DEST_DIR" \ -u $FTP_USERNAME,$FTP_PASSWORD $PLUGIN_HOSTNAME