Commit 6805bc54 authored by Aaron Griffin's avatar Aaron Griffin
Browse files

Ensure archrelease is always run from a proper directory



It should only be run from a trunk dir containing a PKGBUILD

Signed-off-by: default avatarAaron Griffin <aaronmgriffin@gmail.com>
parent b54ddd2c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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