From 5815d639f38ebd8a5622706a18bbfe64f747fd32 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Tue, 14 Dec 2010 15:13:06 +0100 Subject: Accept any dir except a repos subdir as trunk --- archrelease | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'archrelease') diff --git a/archrelease b/archrelease index cd1bcfe..58cb3f0 100755 --- a/archrelease +++ b/archrelease @@ -13,7 +13,9 @@ if [ ! -f PKGBUILD ]; then abort 'archrelease: PKGBUILD not found' fi -if [ "$(basename $(readlink -f .))" != 'trunk' ]; then +trunk=$(basename $(pwd)) + +if [ "$(basename $(dirname $(pwd)))" == "repos" ]; then abort 'archrelease: Not in a package trunk dir' fi @@ -27,7 +29,7 @@ if [ -d "repos/${1}" ]; then svn rm --force -q "repos/${1}" svn commit -q -m "archrelease: remove ${1}" || abort fi -svn copy -q -r HEAD trunk "repos/${1}" -svn commit -q -m "archrelease: copy trunk to ${1}" || abort +svn copy -q -r HEAD "${trunk}" "repos/${1}" +svn commit -q -m "archrelease: copy ${trunk} to ${1}" || abort popd >/dev/null echo 'done' -- cgit v1.2.3-70-g09d2