summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-05-07 07:36:03 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2008-05-07 07:36:03 +0200
commit0cb6e7ab0840196c8b9c0dda64e50fa535b17707 (patch)
tree56e5cc0379dc37fd5d53cf0c26843270b9c929fe
parentaca168b4f23826d3dd5ad15d22ad9a564f69a40d (diff)
downloaddbscripts-0cb6e7ab0840196c8b9c0dda64e50fa535b17707.tar.gz
dbscripts-0cb6e7ab0840196c8b9c0dda64e50fa535b17707.tar.xz
Fail loudly if ftp dir is missing
This allows us to intuitively handle on-the-fly repos by calling `db-update foobar i686` for the foobar-i686 tag, and let us fail on the server side if the repo hasn't been approved/created by someone with admin rights. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-xdb-update8
1 files changed, 7 insertions, 1 deletions
diff --git a/db-update b/db-update
index bde0ee9..5d492fd 100755
--- a/db-update
+++ b/db-update
@@ -32,7 +32,13 @@ LOCKFILE="/tmp/.repolck.$arch.$reponame"
ADDPKGS=""
REMPKGS=""
-if [ ! `type -p fakeroot` ]; then
+if [ ! -d "$ftppath" ]; then
+ echo "FTP path for this repo ($reponame) is missing"
+ echo "Please contact a system administrator"
+ exit 1
+fi
+
+if [ ! $(type -p fakeroot) ]; then
echo "error: fakeroot is missing" >&2
exit 1
fi