diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/clone_stage4 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/clone_stage4 b/scripts/clone_stage4 index ab1cce05..ad468f4f 100755 --- a/scripts/clone_stage4 +++ b/scripts/clone_stage4 @@ -23,12 +23,11 @@ qnd_exit() { BASE_DIR="${ROOT_DIR}/server/local_builds/$1" BOOT_DIR="${ROOT_DIR}/server/boot/$1" [ ! -d "$BASE_DIR" ] && perror "Unknown Vorlage '$1'" -BASEDIR="${BASE_DIR}/$2" +BASE_DIR="${BASE_DIR}/$2" [ ! -d "$BASE_DIR" ] && perror "Unknown Stage '$2' for Vorlage '$1'" TARGET_DIR="$3" mkdir -p "$TARGET_DIR" mkdir -p "$BOOT_DIR" -[ ! -z "$(ls "${TARGET_DIR}")" ] && perror "Target dir '${TARGET_DIR}' not empty" pinfo "Building rsync exclude-file for building stage 4...." cp "${ROOT_DIR}/data/basic.nocopy" "${BOOT_DIR}/exclude-stage4" @@ -48,4 +47,4 @@ else fi pinfo "Cloning via rsync" -rsync -a --numeric-ids -v --exclude-from="${BOOT_DIR}/exclude-stage4" "${RSYNC_OPTS}" "${RSYNC_SOURCE}" "${TARGET_DIR}" || perror "rsync from '${RSYNC_SOURCE}' to '${TARGET_DIR}' failed." +rsync -a --delete --numeric-ids -v --exclude-from="${BOOT_DIR}/exclude-stage4" "${RSYNC_OPTS}" "${RSYNC_SOURCE}" "${TARGET_DIR}" || perror "rsync from '${RSYNC_SOURCE}' to '${TARGET_DIR}' failed." |
