diff options
Diffstat (limited to 'db-move')
-rwxr-xr-x | db-move | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1,7 +1,7 @@ #!/bin/bash if [ $# -ne 4 ]; then - echo "usage: $(basename $0) <pkgname|pkgbase> <repo-from> <repo-to> <arch>" + msg "usage: $(basename $0) <pkgname|pkgbase> <repo-from> <repo-to> <arch>" exit 1 fi @@ -24,7 +24,7 @@ svnrepo_from="$repofrom-$arch" svnrepo_to="$repoto-$arch" if ! check_repo_permission $repoto || ! check_repo_permission $repofrom; then - echo "Error: You don't have permission to move packages from ${repofrom} to ${repoto}" + error "You don't have permission to move packages from ${repofrom} to ${repoto}" exit 1 fi @@ -41,7 +41,7 @@ if [ -d "$packagebase/repos/$svnrepo_from" ]; then pkgver=$(. "$packagebase/repos/$svnrepo_from/PKGBUILD"; echo ${pkgver}) pkgrel=$(. "$packagebase/repos/$svnrepo_from/PKGBUILD"; echo ${pkgrel}) - echo -n "Moving $packagebase from $repofrom to $repoto..." + msg "Moving $packagebase from $repofrom to $repoto..." if [ -d "$packagebase/repos/$svnrepo_to" ]; then /usr/bin/svn rm --force -q "$packagebase/repos/$svnrepo_to" /usr/bin/svn commit -q -m "$(basename $0): $packagebase removed by $(id -un) for move to $repoto" @@ -71,10 +71,8 @@ if [ -d "$packagebase/repos/$svnrepo_from" ]; then /usr/bin/repo-add -q "$ftppath_to/${tarch}/$repoto$DBEXT" ${pkgfiles} >/dev/null || die "Error in repo-add $pkgfiles" /usr/bin/repo-remove -q "$ftppath_from/${tarch}/$repofrom$DBEXT" ${pkgname[@]} >/dev/null || die "Error in repo-remove ${pkgname[@]}" done - - echo 'done' else - die "Error: $packagebase is not in repo $repofrom" + die "$packagebase is not in repo $repofrom" fi repo_unlock $repoto $arch || exit 1 |