summaryrefslogtreecommitdiff
path: root/archrelease
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-12-14 15:13:06 +0100
committerPierre Schmitz <pierre@archlinux.de>2010-12-14 15:13:06 +0100
commit5815d639f38ebd8a5622706a18bbfe64f747fd32 (patch)
tree1cc9dd01464e5bc5be692aa7173799661e574baf /archrelease
parentf804be7bbbb28d961fa9a6018fc8c2e362948f0f (diff)
downloaddevtools-5815d639f38ebd8a5622706a18bbfe64f747fd32.tar.xz
Accept any dir except a repos subdir as trunk
Diffstat (limited to 'archrelease')
-rwxr-xr-xarchrelease8
1 files changed, 5 insertions, 3 deletions
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'