Skip to content

Commit 75102fe

Browse files
author
helpermethod
committed
Prepend date to the sed backup file extension
1 parent e0fc969 commit 75102fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/views/selfupdate_beta.scala.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_debug_mode') ]]; then
140140
echo "sdkman_debug_mode=true" >> "$sdkman_config_file"
141141
fi
142142

143+
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_colour_enable') ]]; then
144+
echo "sdkman_colour_enable=true" >> "$sdkman_config_file"
145+
fi
146+
143147
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_auto_env') ]]; then
144148
echo "sdkman_auto_env=false" >> "$sdkman_config_file"
145149
fi
@@ -165,7 +169,7 @@ if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_auto_complete') ]]; then
165169
fi
166170

167171
# migrate deprecated sdkman_selfupdate_enable configuration
168-
sed -i.bak -e 's/sdkman_selfupdate_enable/sdkman_auto_update/' "$sdkman_config_file" && rm "${sdkman_config_file}.bak"
172+
sed -i$(date +%F).bak -e 's/sdkman_selfupdate_enable/sdkman_auto_update/' "$sdkman_config_file"
169173

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

0 commit comments

Comments
 (0)