diff options
Diffstat (limited to 'test/test.d/db-repo-add.sh')
-rwxr-xr-x | test/test.d/db-repo-add.sh | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/test.d/db-repo-add.sh b/test/test.d/db-repo-add.sh index 8603104..3d83007 100755 --- a/test/test.d/db-repo-add.sh +++ b/test/test.d/db-repo-add.sh @@ -1,6 +1,6 @@ #!/bin/bash -curdir=$(readlink -e $(dirname $0)) +curdir=$(readlink -e "$(dirname "$0")") . "${curdir}/../lib/common.inc" testAddSimplePackages() { @@ -9,19 +9,19 @@ testAddSimplePackages() { local pkgbase local arch - for pkgbase in ${pkgs[@]}; do - for arch in ${arches[@]}; do + for pkgbase in "${pkgs[@]}"; do + for arch in "${arches[@]}"; do cp "${pkgdir}/${pkgbase}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${FTP_BASE}/${PKGPOOL}/" touch "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig" ln -s "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${FTP_BASE}/extra/os/${arch}/" ln -s "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig" "${FTP_BASE}/extra/os/${arch}/" - ../db-repo-add extra ${arch} ${pkgbase}-1-1-${arch}.pkg.tar.xz + ../db-repo-add extra "${arch}" "${pkgbase}-1-1-${arch}.pkg.tar.xz" done done - for pkgbase in ${pkgs[@]}; do - for arch in ${arches[@]}; do - checkPackageDB extra ${pkgbase}-1-1-${arch}.pkg.tar.xz ${arch} + for pkgbase in "${pkgs[@]}"; do + for arch in "${arches[@]}"; do + checkPackageDB extra "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}" done done } @@ -32,21 +32,21 @@ testAddMultiplePackages() { local pkgbase local arch - for arch in ${arches[@]}; do + for arch in "${arches[@]}"; do add_pkgs=() - for pkgbase in ${pkgs[@]}; do + for pkgbase in "${pkgs[@]}"; do cp "${pkgdir}/${pkgbase}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${FTP_BASE}/${PKGPOOL}/" touch "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig" ln -s "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${FTP_BASE}/extra/os/${arch}/" ln -s "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig" "${FTP_BASE}/extra/os/${arch}/" - add_pkgs[${#add_pkgs[*]}]=${pkgbase}-1-1-${arch}.pkg.tar.xz + add_pkgs+=("${pkgbase}-1-1-${arch}.pkg.tar.xz") done - ../db-repo-add extra ${arch} ${add_pkgs[@]} + ../db-repo-add extra "${arch}" "${add_pkgs[@]}" done - for pkgbase in ${pkgs[@]}; do - for arch in ${arches[@]}; do - checkPackageDB extra ${pkgbase}-1-1-${arch}.pkg.tar.xz ${arch} + for pkgbase in "${pkgs[@]}"; do + for arch in "${arches[@]}"; do + checkPackageDB extra "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}" done done } |