diff options
author | Charadon <dev@iotib.net> | 2022-09-30 10:28:14 -0400 |
---|---|---|
committer | Charadon <dev@iotib.net> | 2022-09-30 10:28:14 -0400 |
commit | b0a3cffee6db18145690f1deee8c5367dfc29b83 (patch) | |
tree | aa53496500291a8d21570408fc8c2f262fdf8fb3 /setup.sh | |
parent | fc9e0cd4c05e3224764dd61802c8f0909d42284c (diff) | |
download | dscip-b0a3cffee6db18145690f1deee8c5367dfc29b83.tar.gz |
setup.sh: Added ability to specify DSCIP version. Mostly for use with releases.
Diffstat (limited to 'setup.sh')
-rwxr-xr-x | setup.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/setup.sh b/setup.sh index 816b880..df23ff7 100755 --- a/setup.sh +++ b/setup.sh @@ -10,6 +10,8 @@ PROJECT_LOCATION="" PROJECT_URL="" PROJECT_BRANCH="master" TEMPLATE_DIR="" +# For use when making new releases on gitlab. +DSCIP_VERSION="" show_license() { echo 'Copyright 2022 Charadon @@ -88,7 +90,12 @@ install_dscip() { install -m755 "$DSCIP_PATH"/config.sh "$PROJECT_LOCATION" install_templates || cp "$DSCIP_PATH"/*.sh . else # If not, clone it from upstream. - git clone "https://opencode.net/charadon/dscip" "$PROJECT_LOCATION" + if [ -z "$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 install_templates || echo "Skipping templates as no Template Directory was set..." fi cd "$PROJECT_LOCATION" |