diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-12-31 14:35:11 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-12-31 14:35:11 -0500 |
commit | 99d6b1d0f1f88bf30b75243225cd461afb565f6b (patch) | |
tree | 82a5239fce117f50bd4d80365cb21bd6e5efe409 /testing2x | |
parent | ffe9ada1c43d5fd779863c4be2782f7b690a5fbc (diff) | |
parent | e6294556d3197b7d87f7659355d0e189fad613d6 (diff) |
Merge branch 'cleanup' into master-merge
Conflicts:
config
cron-jobs/sourceballs
db-functions
db-move
db-remove
db-update
Diffstat (limited to 'testing2x')
-rwxr-xr-x | testing2x | 32 |
1 files changed, 15 insertions, 17 deletions
@@ -1,16 +1,16 @@ #!/bin/bash -. "$(dirname $0)/db-functions" -. "$(dirname $0)/config" +. "$(dirname "$(readlink -e "$0")")/config" +. "$(dirname "$(readlink -e "$0")")/db-functions" if [ $# -lt 1 ]; then - msg "usage: $(basename $0) <pkgname|pkgbase> ..." + msg "usage: ${0##*/} <pkgname|pkgbase> ..." 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 'core' 'extra' 'testing'; do +for repo in ${TESTING_REPO} ${STABLE_REPOS[@]}; do for pkgarch in ${ARCHES[@]}; do repo_lock ${repo} ${pkgarch} || exit 1 done @@ -20,41 +20,39 @@ declare -A pkgs for pkgbase in $*; do if [ ! -d "${WORKDIR}/${pkgbase}" ]; then - /usr/bin/svn export -q "${SVNREPO}/${pkgbase}/repos" "${WORKDIR}/${pkgbase}" >/dev/null - found_source=false for pkgarch in ${ARCHES[@]} 'any'; do - svnrepo_from="${WORKDIR}/${pkgbase}/testing-${pkgarch}" - if [ -r "${svnrepo_from}/PKGBUILD" ]; then + xbsrepo_from="$(xbs releasepath ${pkgbase} ${TESTING_REPO} ${pkgarch})" + if [ -r "${xbsrepo_from}/PKGBUILD" ]; then found_source=true break fi done - ${found_source} || die "${pkgbase} not found in [testing]" + ${found_source} || die "${pkgbase} not found in [${TESTING_REPO}]" found_target=false for pkgarch in ${ARCHES[@]} 'any'; do - for repo in 'core' 'extra'; do - svnrepo_to="${WORKDIR}/${pkgbase}/${repo}-${pkgarch}" - if [ -r "${svnrepo_to}/PKGBUILD" ]; then + for repo in ${STABLE_REPOS[@]}; do + xbsrepo_to="$(xbs releasepath ${pkgbase} ${repo} ${pkgarch})" + if [ -r "${xbsrepo_to}/PKGBUILD" ]; then found_target=true pkgs[${repo}]+="${pkgbase} " break 2 fi done done - ${found_target} || die "${pkgbase} neither found in [core] nor [extra]" + ${found_target} || die "${pkgbase} not found in any of these repos: ${STABLE_REPOS[@]}" fi done for pkgarch in ${ARCHES[@]}; do - repo_unlock 'testing' ${pkgarch} + repo_unlock ${TESTING_REPO} ${pkgarch} done -for repo in 'core' 'extra'; do +for repo in ${STABLE_REPOS[@]}; do for pkgarch in ${ARCHES[@]}; do repo_unlock ${repo} ${pkgarch} done if [ -n "${pkgs[${repo}]}" ]; then - "$(dirname $0)/db-move" 'testing' "${repo}" ${pkgs[${repo}]} + "$(dirname $0)/db-move" ${TESTING_REPO} "${repo}" ${pkgs[${repo}]} fi done |