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 <aaronmgriffin@gmail.com>
This commit is contained in:
Aaron Griffin 2008-04-21 21:31:51 -05:00
parent b54ddd2cf4
commit 6805bc54f4
1 changed files with 10 additions and 0 deletions

View File

@ -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