From 0cb6e7ab0840196c8b9c0dda64e50fa535b17707 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 7 May 2008 01:36:03 -0400 Subject: 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 --- db-update | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'db-update') 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 -- cgit v1.2.3-24-g4f1b