From 761b56dcffedc6e484d38c74267810e491add951 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 16 Jun 2013 22:06:51 -0600 Subject: touch up --- cron-jobs/sourceballs | 2 +- db-functions | 6 +++--- db-remove | 10 +++++----- testing2x | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs index 9572a30..cd70916 100755 --- a/cron-jobs/sourceballs +++ b/cron-jobs/sourceballs @@ -95,7 +95,7 @@ for repo in ${PKGREPOS[@]}; do echo "${pkgbase}-${pkgver}${SRCEXT}" >> "${WORKDIR}/available-src-pkgs" newpkgs[${#newpkgs[*]}]="${pkgbase}-${pkgver}${SRCEXT}" else - failedpkgs[${#failedpkgs[*]}]="${pkgbase}-${pkgver}${SRCEXT}" + failedpkgs+=("${pkgbase}-${pkgver}${SRCEXT}") cat "${WORKDIR}/${pkgbase}.log" >> "${WORKDIR}/makepkg-fail.log" fi popd >/dev/null diff --git a/db-functions b/db-functions index c98b26f..dabb22b 100644 --- a/db-functions +++ b/db-functions @@ -369,8 +369,8 @@ check_pkgrepos() { #usage: chk_license ${license[@]}" chk_license() { local l - for l in ${@}; do - in_array ${l} ${ALLOWED_LICENSES[@]} && return 0 + for l in "${@}"; do + in_array "${l}" "${ALLOWED_LICENSES[@]}" && return 0 done return 1 @@ -382,7 +382,7 @@ check_repo_permission() { [ ${#PKGREPOS[@]} -eq 0 ] && return 1 [ -z "${PKGPOOL}" ] && return 1 - in_array "${repo}" ${PKGREPOS[@]} || return 1 + in_array "${repo}" "${PKGREPOS[@]}" || return 1 [ -w "$FTP_BASE/${PKGPOOL}" ] || return 1 diff --git a/db-remove b/db-remove index e632c47..ccab5ea 100755 --- a/db-remove +++ b/db-remove @@ -17,12 +17,12 @@ if ! check_repo_permission $repo; then fi if [ "$arch" == "any" ]; then - tarches=(${ARCHES[@]}) + tarches=("${ARCHES[@]}") else tarches=("$arch") fi -for tarch in ${tarches[@]}; do +for tarch in "${tarches[@]}"; do repo_lock $repo $tarch || exit 1 done @@ -37,11 +37,11 @@ for pkgbase in ${pkgbases[@]}; do warning "$pkgbase not found in $repo-$arch" warning "Removing only $pkgbase from the repo" warning "If it was a split package you have to remove the others yourself!" - remove_pkgs[${#remove_pkgs[*]}]=$pkgbase + remove_pkgs+=($pkgbase) fi done -for tarch in ${tarches[@]}; do - arch_repo_remove "${repo}" "${tarch}" ${remove_pkgs[@]} +for tarch in "${tarches[@]}"; do + arch_repo_remove "${repo}" "${tarch}" "${remove_pkgs[@]}" repo_unlock $repo $tarch done diff --git a/testing2x b/testing2x index a76e972..d93c5f8 100755 --- a/testing2x +++ b/testing2x @@ -8,7 +8,7 @@ if [ $# -lt 1 ]; then exit 1 fi -# Lock everything to reduce possibility of interfering task between the different repo-updates +# Lock everything to reduce possibility of interfering task between the different repo-updates script_lock for repo in ${TESTING_REPO} ${STABLE_REPOS[@]}; do for pkgarch in ${ARCHES[@]}; do -- cgit v1.2.3-54-g00ecf