#!/bin/bash . "$(dirname $0)/db-functions" source_makepkg case "$0" in *64) _arch="x86_64" ;; *) _arch="i686" ;; esac WORKDIR="$TMPDIR/testing2x.$UID" cleanup() { trap '' 0 2 rm -rf "${WORKDIR}" [ -n "$1" ] && exit $1 } ctrl_c() { echo "Interrupted" >&2 cleanup 0 } trap ctrl_c 2 trap cleanup 0 /bin/mkdir "${WORKDIR}" cd "${WORKDIR}" /usr/bin/svn checkout -N $SVN_PATH checkout cd checkout for pkg in $*; do moved=0 /usr/bin/svn up -q ${pkg} if [ -f "${pkg}/repos/testing-${_arch}/${BUILDSCRIPT}" ]; then for repo in core extra; do if [ -f "${pkg}/repos/${repo}-${_arch}/${BUILDSCRIPT}" ]; then echo "===> Moving package '${pkg}': testing-${_arch} -> ${repo}-${_arch}" $(dirname $0)/db-move "${pkg}" "testing" "${repo}" "${_arch}" moved=1 break fi done if [ ${moved} -eq 0 ]; then echo "===> Warning: ${pkg} is only in testing-${_arch}, cannot determine where to move it" fi else echo "===> Warning: ${pkg} is not in testing-${_arch}" fi done cleanup