diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-17 14:45:58 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-17 14:45:58 -0400 |
commit | 6262754028e750dbbacd1d68618bf5553d78f3cd (patch) | |
tree | 735090a8c1c23771c7fcc778a26a95de27c374b2 /db-remove | |
parent | 6638878c5eb6d5116580d06cc3042a5e9beacb7e (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-x | db-remove | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |