From 545ad2ba2842a8b054e8fdd218e95c5424955729 Mon Sep 17 00:00:00 2001 From: Charadon Date: Fri, 30 Sep 2022 12:11:26 -0400 Subject: setup.sh: Fixed issue where git clone fails with empty DSCIP_VERSION --- setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 4c3f75c..391d828 100755 --- a/setup.sh +++ b/setup.sh @@ -107,12 +107,13 @@ install_dscip() { install -m755 "$DSCIP_PATH"/config.sh "$PROJECT_LOCATION"/config.sh install_templates || cp "$DSCIP_PATH"/*.sh . else # If not, clone it from upstream. - if [ -z "$DSCIP_VERSION" ]; + if [ ! "$DSCIP_VERSION" = "" ]; then # Check if using a release setup.sh, if not, clone from master. git clone "https://opencode.net/charadon/dscip" --depth 1 --branch "$DSCIP_VERSION" "$PROJECT_LOCATION" else git clone "https://opencode.net/charadon/dscip" "$PROJECT_LOCATION" fi + rm "$PROJECT_LOCATION"/setup.sh install_templates || echo "Skipping templates as no Template Directory was set..." fi # Modifying config.sh with variables obtained from setup.sh -- cgit 1.4.1-2-gfad0