summaryrefslogtreecommitdiff
path: root/crossrepomove.in
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-24 11:03:38 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-24 11:03:38 -0400
commit7eadec0ab1c0c09c4d940b20d6f88f81a4ab149e (patch)
tree6e1d88dcf869bf567f852c3ea169ff79a8b31ed5 /crossrepomove.in
parent7358ca574bf6fd133a5d883f2da6e359335ac830 (diff)
parent280d5501b00945fdf4e8de13724ec22b87a41576 (diff)
Merge commit '280d55' into complete
Diffstat (limited to 'crossrepomove.in')
-rw-r--r--crossrepomove.in42
1 files changed, 14 insertions, 28 deletions
diff --git a/crossrepomove.in b/crossrepomove.in
index 8794326..b1204af 100644
--- a/crossrepomove.in
+++ b/crossrepomove.in
@@ -11,26 +11,16 @@ fi
pkgbase="${1}"
-packages_svn='svn+ssh://gerolde.archlinux.org/srv/svn-packages'
-packages_server='gerolde.archlinux.org'
-community_svn='svn+ssh://svn-community@nymeria.archlinux.org/srv/repos/svn-community/svn'
-community_server='nymeria.archlinux.org'
-mirror='http://mirrors.kernel.org/archlinux'
-
case $scriptname in
extra2community)
- source_svn="${packages_svn}"
- target_svn="${community_svn}"
- source_server="${packages_server}"
- target_server="${community_server}"
+ source_name='packages'
+ target_name='community'
source_repo='extra'
target_repo='community'
;;
community2extra)
- source_svn="${community_svn}"
- target_svn="${packages_svn}"
- source_server="${community_server}"
- target_server="${packages_server}"
+ source_name='community'
+ target_name='packages'
source_repo='community'
target_repo='extra'
;;
@@ -39,6 +29,13 @@ case $scriptname in
;;
esac
+server='nymeria.archlinux.org'
+mirror="http://${server}"
+source_svn="svn+ssh://svn-${source_name}@${server}/srv/repos/svn-${source_name}/svn"
+target_svn="svn+ssh://svn-${target_name}@${server}/srv/repos/svn-${target_name}/svn"
+source_dbscripts="/srv/repos/svn-${source_name}/dbscripts"
+target_dbscripts="/srv/repos/svn-${target_name}/dbscripts"
+
setup_workdir
pushd $WORKDIR >/dev/null
@@ -59,7 +56,7 @@ for _arch in ${arch[@]}; do
for _pkgname in ${pkgname[@]}; do
fullver=$(get_full_version $_pkgname)
# FIXME: this only works with .xz packages
- ssh "${target_server}" "cd staging/${target_repo}
+ ssh "${server}" "cd staging/${target_repo}
curl -O ${mirror}/${source_repo}/os/${repo_arch}/$_pkgname-$fullver-${_arch}.pkg.tar.xz
curl -O ${mirror}/${source_repo}/os/${repo_arch}/$_pkgname-$fullver-${_arch}.pkg.tar.xz.sig" || die
done
@@ -73,22 +70,11 @@ pushd "target_checkout/${pkgbase}/trunk" >/dev/null
archrelease "${arch[@]/#/$target_repo-}" || die
popd >/dev/null
-if [[ "${target_server}" == "${community_server}" ]]; then
- dbscripts_path='/srv/repos/svn-community/dbscripts'
-else
- dbscripts_path='/arch'
-fi
-
-ssh "${target_server}" "${dbscripts_path}/db-update" || die
+ssh "${server}" "${target_dbscripts}/db-update" || die
msg "Removing ${pkgbase} from ${source_repo}"
-if [[ "${source_server}" == "${community_server}" ]]; then
- dbscripts_path='/srv/repos/svn-community/dbscripts'
-else
- dbscripts_path='/arch'
-fi
for _arch in ${arch[@]}; do
- ssh "${source_server}" "${dbscripts_path}/db-remove ${source_repo} ${_arch} ${pkgbase}"
+ ssh "${server}" "${source_dbscripts}/db-remove ${source_repo} ${_arch} ${pkgbase}"
done
svn -q checkout -N "${source_svn}" source_checkout
svn -q up "source_checkout/${pkgbase}"