From 6262754028e750dbbacd1d68618bf5553d78f3cd Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 17 Apr 2016 14:45:58 -0400 Subject: Use += instead of jumping through hoops. The += operator was introduced in Bash 3.1, and was already used in some places in dbscripts, but not everywhere. For normal strings, this isn't a big deal, but appending to an array without using += is nasty. --- db-remove | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'db-remove') diff --git a/db-remove b/db-remove index 3bb67b0..ca56ecc 100755 --- a/db-remove +++ b/db-remove @@ -35,14 +35,14 @@ for pkgbase in "${pkgbases[@]}"; do arch_svn checkout -q "${SVNREPO}/${pkgbase}" "${WORKDIR}/svn/${pkgbase}" >/dev/null if [ -d "${WORKDIR}/svn/$pkgbase/repos/$svnrepo" ]; then - remove_pkgs=("${remove_pkgs[@]}" $(. "${WORKDIR}/svn/$pkgbase/repos/$svnrepo/PKGBUILD"; echo ${pkgname[@]})) + remove_pkgs+=($(. "${WORKDIR}/svn/$pkgbase/repos/$svnrepo/PKGBUILD"; echo ${pkgname[@]})) arch_svn rm --force -q "${WORKDIR}/svn/$pkgbase/repos/$svnrepo" arch_svn commit -q "${WORKDIR}/svn/$pkgbase" -m "${0##*/}: $pkgbase removed by $(id -un)" else warning "%s not found in %s" "$pkgbase" "$svnrepo" warning "Removing only %s from the repo" "$pkgbase" warning "If it was a split package you have to remove the others yourself!" - remove_pkgs[${#remove_pkgs[*]}]=$pkgbase + remove_pkgs+=("$pkgbase") fi done -- cgit v1.2.3