summaryrefslogtreecommitdiff
path: root/archrelease
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-04-21 21:31:51 -0500
committerAaron Griffin <aaronmgriffin@gmail.com>2008-04-21 21:31:51 -0500
commit6805bc54f4facd808f11399284e1b61c61a164f5 (patch)
tree6a919cd63ae6c1664040d5fe9a777dff40fac12c /archrelease
parentb54ddd2cf4159cf0678db1000ddf7e1796bbb6c6 (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>
Diffstat (limited to 'archrelease')
-rwxr-xr-xarchrelease10
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