summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastian Blank <bastian.blank@credativ.de>2016-01-26 10:21:07 +0100
committerBastian Blank <bastian.blank@credativ.de>2016-01-26 10:24:53 +0100
commit5f0970a25815c17d06c0ab80ae683ceb962ccaef (patch)
tree3117d0162eaff54822554e4fe07d7161457911aa
parent9c292f48d4c4a28085684bb990a744590d807ec1 (diff)
Factor out source exclude specification
-rwxr-xr-xbin/ftpsync18
1 files changed, 11 insertions, 7 deletions
diff --git a/bin/ftpsync b/bin/ftpsync
index e8aa021..71fa4ad 100755
--- a/bin/ftpsync
+++ b/bin/ftpsync
@@ -468,21 +468,25 @@ STATS_TOTAL_RSYNC_TIME2=0
EXCLUDE="${EXCLUDE} --exclude=.~tmp~/"
SOURCE_EXCLUDE=${SOURCE_EXCLUDE:-""}
+SOURCE_EXCLUDE_EXPLICIT=
ARCH_EXCLUDE=${ARCH_EXCLUDE:-""}
+
# Exclude architectures defined in $ARCH_EXCLUDE
for ARCH in ${ARCH_EXCLUDE}; do
EXCLUDE="${EXCLUDE} --exclude=binary-${ARCH}/ --exclude=installer-${ARCH}/ --exclude=Contents-${ARCH}.gz --exclude=Contents-udeb-${ARCH}.gz --exclude=Contents-${ARCH}.diff/ --exclude=arch-${ARCH}.files --exclude=arch-${ARCH}.list.gz --exclude=*_${ARCH}.deb --exclude=*_${ARCH}.udeb --exclude=*_${ARCH}.changes"
if [[ ${ARCH} = source ]]; then
- if [[ -z ${SOURCE_EXCLUDE} ]]; then
- SOURCE_EXCLUDE=" --exclude=source/ --exclude=*.tar.gz --exclude=*.diff.gz --exclude=*.tar.bz2 --exclude=*.tar.xz --exclude=*.diff.bz2 --exclude=*.dsc "
- # Over-ride the exclude=*.tar.gz above - there are some
- # tar.gz files in the archive that are *not* source
- # files...
- SOURCE_EXCLUDE="$SOURCE_EXCLUDE --include=debian-cd_info.tar.gz --include=debian-faq.en.html.tar.gz --include=netboot.tar.gz --include=nfsroot.tar.gz --include=hd-media.tar.gz --include=dedication*.tar.gz"
- fi
+ SOURCE_EXCLUDE_EXPLICIT=1
fi
done
+if [[ ${SOURCE_EXCLUDE_EXPLICIT} ]] && [[ -z ${SOURCE_EXCLUDE} ]]; then
+ SOURCE_EXCLUDE=" --exclude=source/ --exclude=*.tar.gz --exclude=*.diff.gz --exclude=*.tar.bz2 --exclude=*.tar.xz --exclude=*.diff.bz2 --exclude=*.dsc "
+ # Over-ride the exclude=*.tar.gz above - there are some
+ # tar.gz files in the archive that are *not* source
+ # files...
+ SOURCE_EXCLUDE="$SOURCE_EXCLUDE --include=debian-cd_info.tar.gz --include=debian-faq.en.html.tar.gz --include=netboot.tar.gz --include=nfsroot.tar.gz --include=hd-media.tar.gz --include=dedication*.tar.gz"
+fi
+
# Hooks
HOOK1=${HOOK1:-""}
HOOK2=${HOOK2:-""}