From 7fd47242623923011387ef293bff193070fd23e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Mon, 10 Aug 2015 11:58:21 +0200 Subject: [PATCH] Avoid extra slash at the start of the --get-image-path when no directory is used --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 56163ea..4a233bf 100755 --- a/build.sh +++ b/build.sh @@ -35,9 +35,9 @@ target_image_name() { IMAGE_EXT="img" fi if [ "$KALI_VARIANT" = "default" ]; then - echo "$TARGET_SUBDIR/kali-linux-$KALI_VERSION-$KALI_ARCH.$IMAGE_EXT" + echo "${TARGET_SUBDIR:+$TARGET_SUBDIR/}kali-linux-$KALI_VERSION-$KALI_ARCH.$IMAGE_EXT" else - echo "$TARGET_SUBDIR/kali-linux-$KALI_VARIANT-$KALI_VERSION-$KALI_ARCH.$IMAGE_EXT" + echo "${TARGET_SUBDIR:+$TARGET_SUBDIR/}kali-linux-$KALI_VARIANT-$KALI_VERSION-$KALI_ARCH.$IMAGE_EXT" fi }