summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauri Aarnio <Lauri.Aarnio@iki.fi>2009-03-05 15:00:11 +0200
committerLauri Leukkunen <lle@rahina.org>2009-03-07 16:05:39 +0200
commit4e1b147c170633166818218b2908a27ce03a59d0 (patch)
tree1b6ae0165032d26ef226adfc2ec787c6016f0d46
parent575ea17d95bc50b116b0261ac81c3cbfa5fba371 (diff)
Bugfix: "sb2" script: check that tools_root exists
- Check that tools_root exists and give an error message if it doesn't. Previously, "sb2" just failed silently if that directory didn't exist.
-rwxr-xr-xutils/sb25
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/sb2 b/utils/sb2
index 594c96d..3952d9b 100755
--- a/utils/sb2
+++ b/utils/sb2
@@ -237,6 +237,11 @@ function sboxify_environment()
SBOX_TOOLS_ROOT=$SBOX_FORCED_TOOLS_ROOT
fi
+ # Check that tools exist (or at least the directory exists)
+ if [ ! -d "$SBOX_TOOLS_ROOT" ]; then
+ exit_error "Tools directory '$SBOX_TOOLS_ROOT' does not exist."
+ fi
+
if [ -d $SBOX_SESSION_DIR/target_root ]; then
# A copy of target_root already exists, use that
# (this may happen when we are joining an old