summaryrefslogtreecommitdiff
path: root/db-move
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2011-10-30 20:50:13 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2011-10-30 20:50:13 -0300
commitb451313a7edbdbd4a912c93136b53a09a34ae750 (patch)
tree042b64583df823d47bedd567fbd33a8b3b7db97a /db-move
parente9d0581b173853e647b36caa170b7c4bbee43643 (diff)
parentd0586258fda6753053a7d28a2d7d15228b1d8897 (diff)
Merge branch 'master' of https://projects.archlinux.org/git/dbscripts
Diffstat (limited to 'db-move')
-rwxr-xr-xdb-move13
1 files changed, 10 insertions, 3 deletions
diff --git a/db-move b/db-move
index ff1b0e2..019faa2 100755
--- a/db-move
+++ b/db-move
@@ -78,11 +78,18 @@ for pkgbase in ${args[@]:2}; do
pkgver=$(. "${svnrepo_from}/PKGBUILD"; echo $(get_full_version ${epoch:-0} ${pkgver} ${pkgrel}))
if [ -d "${svnrepo_to}" ]; then
- /usr/bin/svn rm --force -q "${svnrepo_to}"
- /usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "$(basename $0): ${pkgbase} removed by $(id -un) for move to [${repo_to}] (${pkgarch})"
+ for file in $(/usr/bin/svn ls "${svnrepo_to}"); do
+ /usr/bin/svn rm -q "${svnrepo_to}/$file"
+ done
+ else
+ mkdir "${svnrepo_to}"
+ /usr/bin/svn add -q "${svnrepo_to}"
fi
- /usr/bin/svn mv -q -r HEAD "${svnrepo_from}" "${svnrepo_to}"
+ for file in $(svn ls "${svnrepo_from}"); do
+ /usr/bin/svn mv -q -r HEAD "${svnrepo_from}/$file" "${svnrepo_to}/"
+ done
+ /usr/bin/svn rm --force -q "${svnrepo_from}"
/usr/bin/svn commit -q "${WORKDIR}/svn/${pkgbase}" -m "$(basename $0): moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${pkgarch})"
for pkgname in ${pkgnames[@]}; do