Added option to disable PLUGINS_SYNC_UPDATE

For #576
This commit is contained in:
Geoff Bourne
2020-07-08 19:07:53 -05:00
parent 9a7a532f7b
commit ecbdeb2096
2 changed files with 17 additions and 81 deletions

View File

@@ -2,14 +2,20 @@
. ${SCRIPTS:-/}start-utils
: ${PLUGINS_SYNC_UPDATE:=true}
isDebugging && set -x
if [ -d /plugins ]; then
case ${TYPE} in
SPIGOT|BUKKIT|PAPER)
mkdir -p /data/plugins
log "Copying plugins over..."
if isTrue ${PLUGINS_SYNC_UPDATE}; then
updateArg="--update"
fi
# Copy plugins over using rsync to allow deeply nested updates of plugins
# only updates files if the source file is newer and print updated files
rsync -a --out-format="update:%f:Last Modified %M" --prune-empty-dirs --update /plugins /data
rsync -a --out-format="update:%f:Last Modified %M" --prune-empty-dirs $updateArg /plugins /data
;;
esac
fi