Commit 071824e 1 parent b2d2aee commit 071824e Copy full SHA for 071824e
File tree 1 file changed +12
-11
lines changed
1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,11 @@ get_download_url() {
24
24
local latest=' https://api.github.com/repos/exercism/configlet/releases/latest'
25
25
local arch
26
26
case " $( uname -m) " in
27
- x86_64) arch=' x86-64' ;;
28
- * 686* ) arch=' i386' ;;
29
- * 386* ) arch=' i386' ;;
30
- * ) arch=' x86-64' ;;
27
+ aarch64|arm64) arch=' arm64' ;;
28
+ x86_64) arch=' x86-64' ;;
29
+ * 686* ) arch=' i386' ;;
30
+ * 386* ) arch=' i386' ;;
31
+ * ) arch=' x86-64' ;;
31
32
esac
32
33
local suffix=" ${os} _${arch} .${ext} "
33
34
curl " ${curlopts[@]} " --header ' Accept: application/vnd.github.v3+json' " ${latest} " |
@@ -47,7 +48,7 @@ main() {
47
48
fi
48
49
49
50
local os
50
- case " $( uname) " in
51
+ case " $( uname -s ) " in
51
52
Darwin* ) os=' macos' ;;
52
53
Linux* ) os=' linux' ;;
53
54
Windows* ) os=' windows' ;;
@@ -58,8 +59,8 @@ main() {
58
59
59
60
local ext
60
61
case " ${os} " in
61
- windows* ) ext=' zip' ;;
62
- * ) ext=' tar.gz' ;;
62
+ windows) ext=' zip' ;;
63
+ * ) ext=' tar.gz' ;;
63
64
esac
64
65
65
66
echo " Fetching configlet..." >&2
@@ -69,16 +70,16 @@ main() {
69
70
curl " ${curlopts[@]} " --output " ${output_path} " " ${download_url} "
70
71
71
72
case " ${ext} " in
72
- * zip) unzip " ${output_path} " -d " ${output_dir} " ;;
73
- * ) tar xzf " ${output_path} " -C " ${output_dir} " ;;
73
+ zip) unzip " ${output_path} " -d " ${output_dir} " ;;
74
+ * ) tar xzf " ${output_path} " -C " ${output_dir} " ;;
74
75
esac
75
76
76
77
rm -f " ${output_path} "
77
78
78
79
local executable_ext
79
80
case " ${os} " in
80
- windows* ) executable_ext=' .exe' ;;
81
- * ) executable_ext=' ' ;;
81
+ windows) executable_ext=' .exe' ;;
82
+ * ) executable_ext=' ' ;;
82
83
esac
83
84
84
85
local configlet_path=" ${output_dir} /configlet${executable_ext} "
You can’t perform that action at this time.
0 commit comments