Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/views/install_beta.scala.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ else
echo "sdkman_auto_complete=true" >> "$sdkman_config_file"
fi
echo "sdkman_auto_env=false" >> "$sdkman_config_file"
echo "sdkman_auto_update=true" >> "$sdkman_config_file"
echo "sdkman_beta_channel=true" >> "$sdkman_config_file"
echo "sdkman_checksum_enable=true" >> "$sdkman_config_file"
echo "sdkman_colour_enable=true" >> "$sdkman_config_file"
Expand All @@ -238,7 +239,7 @@ echo "sdkman_curl_max_time=10" >> "$sdkman_config_file"
echo "sdkman_debug_mode=false" >> "$sdkman_config_file"
echo "sdkman_insecure_ssl=false" >> "$sdkman_config_file"
echo "sdkman_rosetta2_compatible=false" >> "$sdkman_config_file"
echo "sdkman_selfupdate_enable=true" >> "$sdkman_config_file"
echo "sdkman_selfupdate_feature=true" >> "$sdkman_config_file"

echo "Download script archive..."
curl --location --progress-bar "${SDKMAN_SERVICE}/broker/download/sdkman/install/${SDKMAN_VERSION}/${SDKMAN_PLATFORM}" > "$sdkman_zip_file"
Expand Down
17 changes: 17 additions & 0 deletions app/views/selfupdate_beta.scala.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import java.time.LocalDate
@(cliVersion: String, baseUrl: String)#!/bin/bash
#
# Copyright 2017 Marco Vermeulen
Expand Down Expand Up @@ -156,6 +157,10 @@ if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_checksum_enable') ]]; then
echo "sdkman_checksum_enable=true" >> "$sdkman_config_file"
fi

if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_selfupdate_feature') ]]; then
echo "sdkman_selfupdate_feature=true" >> "$sdkman_config_file"
fi

if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_auto_complete') ]]; then
if [ -z "$ZSH_VERSION" -a -z "$BASH_VERSION" ]; then
echo "sdkman_auto_complete=false" >> "$sdkman_config_file"
Expand All @@ -164,6 +169,18 @@ if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_auto_complete') ]]; then
fi
fi

# migrate deprecated sdkman_selfupdate_enable configuration
@defining(LocalDate.now()) { now =>
cp "$sdkman_config_file" "${sdkman_config_file}-@{now}.bak"

sed 's/sdkman_selfupdate_enable/sdkman_auto_update/' "$sdkman_config_file" > "${sdkman_config_file}.tmp" &&
mv "${sdkman_config_file}.tmp" "$sdkman_config_file"
}

if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_auto_update') ]]; then
echo "sdkman_auto_update=true" >> "$sdkman_config_file"
fi

# drop version token
echo "$SDKMAN_VERSION" > "${SDKMAN_DIR}/var/version"

Expand Down