File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ kerl
2
+ kerl-home
Original file line number Diff line number Diff line change
1
+ KERL_VERSION=" 1.8.2"
2
+
1
3
ensure_kerl_setup () {
2
4
set_kerl_env
3
5
ensure_kerl_installed
@@ -7,15 +9,19 @@ ensure_kerl_setup() {
7
9
ensure_kerl_installed () {
8
10
if [ ! -f " $( kerl_path) " ]; then
9
11
download_kerl
12
+ elif [ " $( " $( kerl_path) " version) " != " $KERL_VERSION " ]; then
13
+ # If the kerl file already exists and the version does not match, remove
14
+ # it and download the correct version
15
+ rm " $( kerl_path) "
16
+ download_kerl
10
17
fi
11
18
}
12
19
13
20
download_kerl () {
14
21
# Print to stderr so asdf doesn't assume this string is a list of versions
15
22
echo " Downloading kerl..." >&2
16
23
17
- local kerl_version=" 1.8.1"
18
- local kerl_url=" https://raw.githubusercontent.com/kerl/kerl/${kerl_version} /kerl"
24
+ local kerl_url=" https://raw.githubusercontent.com/kerl/kerl/${KERL_VERSION} /kerl"
19
25
20
26
curl -Lso " $( kerl_path) " $kerl_url
21
27
chmod +x " $( kerl_path) "
You can’t perform that action at this time.
0 commit comments