From df874b01ae668b5cf2d505857ff6e3387d2a3262 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sun, 29 May 2016 16:35:46 +0200 Subject: [PATCH] Fix for empty install path Will default to '/' due to regular usage of that var in paths --- astronaut/astronaut | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astronaut/astronaut b/astronaut/astronaut index 91b10bd..75a4c28 100755 --- a/astronaut/astronaut +++ b/astronaut/astronaut @@ -221,13 +221,13 @@ fi # Create the directories if [ "$_download_only" = false ]; then # This variable can be set by a wrapper script in need to nuke the install dir. - if [ "$_nuke_dir_install" = true ]; then + if [ "$_nuke_dir_install" = true -a ! -z "$dir_install" ]; then rm -rf "$dir_install" fi rm -rf "$dir_build" mkdir -p "$dir_build" - mkdir -p "$dir_install" + [ ! -z "$dir_install" ] && mkdir -p "$dir_install" cd "$dir_build" fi