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-update | |
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-update')
-rwxr-xr-x | db-update | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -90,7 +90,7 @@ for repo in "${repos[@]}"; do if [ -f "$FTP_BASE/${PKGPOOL}/${pkgfile}.sig" ]; then ln -s "../../../${PKGPOOL}/${pkgfile}.sig" "$FTP_BASE/$repo/os/${pkgarch}" fi - add_pkgs[${#add_pkgs[*]}]=${pkgfile} + add_pkgs+=("${pkgfile}") done if [ ${#add_pkgs[@]} -ge 1 ]; then arch_repo_add "${repo}" "${pkgarch}" "${add_pkgs[@]}" |