From 0cbcb91ccf96631ff01c605c11e2b14c75dc446c Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Wed, 10 Feb 2016 09:12:45 +0100 Subject: Correctly generate architecture list in case for arch include --- bin/ftpsync | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/ftpsync b/bin/ftpsync index fcd11b3..18e8e01 100755 --- a/bin/ftpsync +++ b/bin/ftpsync @@ -202,13 +202,22 @@ tracefile() { if [[ full = ${EXTENDEDTRACE} ]]; then GLOBALARCHLIST="source amd64 arm64 armel armhf hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc ppc64el s390 s390x sparc" - AEXCLUDE="^${ARCH_EXCLUDE// /\$|^}$" ARCHLIST="" - for ARCH in ${GLOBALARCHLIST}; do - if ! [[ ${ARCH} =~ ${AEXCLUDE} ]]; then - ARCHLIST="${ARCHLIST} ${ARCH}" - fi - done + if [[ ${ARCH_INCLUDE} ]]; then + AINCLUDE="^${ARCH_INCLUDE// /\$|^}$" + for ARCH in ${GLOBALARCHLIST}; do + if [[ ${ARCH} =~ ${AINCLUDE} ]]; then + ARCHLIST="${ARCHLIST} ${ARCH}" + fi + done + else + AEXCLUDE="^${ARCH_EXCLUDE// /\$|^}$" + for ARCH in ${GLOBALARCHLIST}; do + if ! [[ ${ARCH} =~ ${AEXCLUDE} ]]; then + ARCHLIST="${ARCHLIST} ${ARCH}" + fi + done + fi out="GUESSED:{${ARCHLIST}}" echo "Architectures: ${out}" echo "Upstream-mirror: ${RSYNC_HOST}" -- cgit v1.2.3