If the data directory is not in the expected place, the script complains
with an error message and stops, instead of giving obscure messages.

Partially fixes Issue 459.

Signed-off-by: Michele Tartara <[email protected]>
---
 devel/build_chroot | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/devel/build_chroot b/devel/build_chroot
index d281c20..926c74a 100755
--- a/devel/build_chroot
+++ b/devel/build_chroot
@@ -34,6 +34,16 @@ then
   exit
 fi
 
+if [ ! -d $DATA_DIR ]
+then
+  echo "The data directory"
+  echo "  $DATA_DIR"
+  echo "does not exist."
+  echo "Please, set the DATA_DIR environment variable so that it points to the"
+  echo "data directory."
+  exit
+fi
+
 set -e
 
 #Cleanup
-- 
1.8.2.1

Reply via email to