From 6805bc54f4facd808f11399284e1b61c61a164f5 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 21 Apr 2008 21:31:51 -0500 Subject: Ensure archrelease is always run from a proper directory It should only be run from a trunk dir containing a PKGBUILD Signed-off-by: Aaron Griffin --- archrelease | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'archrelease') diff --git a/archrelease b/archrelease index 2ce6f35..bc9a7d6 100755 --- a/archrelease +++ b/archrelease @@ -5,6 +5,16 @@ if [ "$1" = "" ]; then exit 1 fi +if [ ! -f "PKGBUILD" ]; then + echo "archrelease: PKGBUILD not found" + exit 1 +fi + +if [ "$(basename $(readlink -f .))" != "trunk" ]; then + echo "archrelease: Not in a package trunk dir" + exit 1 +fi + if [ ! -d ../repos/$1 ]; then pushd .. [ -d repos ] || mkdir repos -- cgit v1.2.3-70-g09d2