diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-17 01:59:40 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-17 01:59:40 -0400 |
commit | fdc37e5cf06d845a88971881a99de034a723c94a (patch) | |
tree | 6a12e5972fecd04800713d0e50dbc4d4a3d51d49 /test/test.d/ftpdir-cleanup.sh | |
parent | ff2983c207e6ab2a9381e20312355c42307187f6 (diff) |
Grab an updated test/ directory from lukeshu/archlinux+cleanup+librelib
It's not like we were running the tests anyway, and this makes merging
easier.
Diffstat (limited to 'test/test.d/ftpdir-cleanup.sh')
-rwxr-xr-x | test/test.d/ftpdir-cleanup.sh | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/test/test.d/ftpdir-cleanup.sh b/test/test.d/ftpdir-cleanup.sh index 20026b4..5a7afea 100755 --- a/test/test.d/ftpdir-cleanup.sh +++ b/test/test.d/ftpdir-cleanup.sh @@ -1,62 +1,60 @@ #!/bin/bash -curdir=$(readlink -e $(dirname $0)) +curdir="$(dirname "$(readlink -e "$0")")" . "${curdir}/../lib/common.inc" testCleanupSimplePackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-a' 'pkg-simple-b') local pkgbase local arch - for pkgbase in ${pkgs[@]}; do - for arch in ${arches[@]}; do - releasePackage extra ${pkgbase} ${arch} + for pkgbase in "${pkgs[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do + releasePackage extra "${pkgbase}" "${arch}" done done ../db-update - for arch in ${arches[@]}; do - ../db-remove extra ${arch} pkg-simple-a + for arch in "${ARCH_BUILD[@]}"; do + ../db-remove extra "${arch}" pkg-simple-a done ../cron-jobs/ftpdir-cleanup >/dev/null - for arch in ${arches[@]}; do + for arch in "${ARCH_BUILD[@]}"; do local pkg1="pkg-simple-a-1-1-${arch}.pkg.tar.xz" - checkRemovedPackage extra 'pkg-simple-a' ${arch} + checkRemovedPackage extra 'pkg-simple-a' "${arch}" [ -f "${FTP_BASE}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found" [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found" local pkg2="pkg-simple-b-1-1-${arch}.pkg.tar.xz" - checkPackage extra ${pkg2} ${arch} + checkPackage extra "${pkg2}" "${arch}" done } testCleanupEpochPackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-epoch') local pkgbase local arch - for pkgbase in ${pkgs[@]}; do - for arch in ${arches[@]}; do - releasePackage extra ${pkgbase} ${arch} + for pkgbase in "${pkgs[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do + releasePackage extra "${pkgbase}" "${arch}" done done ../db-update - for arch in ${arches[@]}; do - ../db-remove extra ${arch} pkg-simple-epoch + for arch in "${ARCH_BUILD[@]}"; do + ../db-remove extra "${arch}" pkg-simple-epoch done ../cron-jobs/ftpdir-cleanup >/dev/null - for arch in ${arches[@]}; do + for arch in "${ARCH_BUILD[@]}"; do local pkg1="pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz" - checkRemovedPackage extra 'pkg-simple-epoch' ${arch} + checkRemovedPackage extra 'pkg-simple-epoch' "${arch}" [ -f "${FTP_BASE}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found" [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found" done @@ -67,8 +65,8 @@ testCleanupAnyPackages() { local pkgbase local arch='any' - for pkgbase in ${pkgs[@]}; do - releasePackage extra ${pkgbase} any + for pkgbase in "${pkgs[@]}"; do + releasePackage extra "${pkgbase}" any done ../db-update @@ -81,39 +79,38 @@ testCleanupAnyPackages() { [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found" local pkg2="pkg-any-b-1-1-${arch}.pkg.tar.xz" - checkAnyPackage extra ${pkg2} + checkAnyPackage extra "${pkg2}" } testCleanupSplitPackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-split-a' 'pkg-split-b') local pkg local pkgbase local arch - for pkgbase in ${pkgs[@]}; do - for arch in ${arches[@]}; do - releasePackage extra ${pkgbase} ${arch} + for pkgbase in "${pkgs[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do + releasePackage extra "${pkgbase}" "${arch}" done done ../db-update - for arch in ${arches[@]}; do - ../db-remove extra ${arch} ${pkgs[0]} + for arch in "${ARCH_BUILD[@]}"; do + ../db-remove extra "${arch}" "${pkgs[0]}" done ../cron-jobs/ftpdir-cleanup >/dev/null - for arch in ${arches[@]}; do - for pkg in "${pkgdir}/${pkgs[0]}"/*-${arch}${PKGEXT}; do - checkRemovedPackage extra ${pkgs[0]} ${arch} + for arch in "${ARCH_BUILD[@]}"; do + for pkg in "${pkgdir}/${pkgs[0]}"/*-"${arch}"${PKGEXT}; do + checkRemovedPackage extra "${pkgs[0]}" "${arch}" [ -f "${FTP_BASE}/${PKGPOOL}/${pkg}" ] && fail "${PKGPOOL}/${pkg} found" [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg}" ] && fail "${repo}/os/${arch}/${pkg} found" done - for pkg in "${pkgdir}/${pkgs[1]}"/*-${arch}${PKGEXT}; do - checkPackage extra $(basename ${pkg}) ${arch} + for pkg in "${pkgdir}/${pkgs[1]}"/*-"${arch}"${PKGEXT}; do + checkPackage extra "${pkg##*/}" "${arch}" done done } |