diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-04-21 21:31:51 -0500 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-04-21 21:31:51 -0500 |
commit | 6805bc54f4facd808f11399284e1b61c61a164f5 (patch) | |
tree | 6a919cd63ae6c1664040d5fe9a777dff40fac12c | |
parent | b54ddd2cf4159cf0678db1000ddf7e1796bbb6c6 (diff) |
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>
-rwxr-xr-x | archrelease | 10 |
1 files changed, 10 insertions, 0 deletions
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 |