summaryrefslogtreecommitdiff
path: root/db-remove
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-04-17 14:45:58 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-04-17 14:45:58 -0400
commit6262754028e750dbbacd1d68618bf5553d78f3cd (patch)
tree735090a8c1c23771c7fcc778a26a95de27c374b2 /db-remove
parent6638878c5eb6d5116580d06cc3042a5e9beacb7e (diff)
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.
Diffstat (limited to 'db-remove')
-rwxr-xr-xdb-remove4
1 files changed, 2 insertions, 2 deletions
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