From 2d477b38bcdec2d79b576c17ff1110a1b1e6b385 Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Wed, 24 Feb 2010 16:16:27 -0800 Subject: [PATCH] Fix bootstrap when run within another sea and check for writability of /usr/local, defaulting to $HOME/narwhal --- bootstrap.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index d809571e9..6faf03629 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -78,7 +78,12 @@ function check_and_exit () { fi } -default_directory="/usr/local/narwhal" +if [ -w "/usr/local" ]; then + default_directory="/usr/local/narwhal" +else + default_directory="$HOME/narwhal" +fi + install_directory="" tmp_zip="/tmp/narwhal.zip" @@ -113,6 +118,8 @@ github_project="$github_user-narwhal" github_path=$(echo "$github_project" | tr '-' '/') unset NARWHAL_ENGINE +unset SEA +unset SEALVL PATH_SAVED="$PATH"