File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ readonly g_download_url_template=https://github.com/__GITHUB_COORDINATES__/relea
3131#
3232readonly g_binary_path_in_archive_template=__ARCHIVE_DIR__/__BINARY_NAME__
3333readonly g_downloaded_file_is_not_an_archive=false
34- readonly g_platform_pattern=uname_l_dash_amd64 # one of uname_c_x86_64|uname_l_dash_amd64|uname_l_underscore_amd64|custom
34+ readonly g_platform_pattern=custom # one of uname_c_x86_64|uname_l_dash_amd64|uname_l_underscore_amd64|custom
3535
3636# Borrowed to someone, but I don't remember who it was, sorry :(
3737# Print message $2 with log-level $1 to STDERR, colorized if terminal
@@ -188,7 +188,17 @@ get_platform() {
188188}
189189
190190get_platform_custom () {
191- echo " NOT USED"
191+ local machine_hardware_name
192+ machine_hardware_name=${ASDF_OVERWRITE_ARCH:- " $( uname -m) " }
193+
194+ case " ${machine_hardware_name} " in
195+ ' x86_64' ) local cpu_type=" amd64" ;;
196+ ' aarch64' ) local cpu_type=" arm64" ;;
197+ ' armv7l' ) local cpu_type=" arm" ;;
198+ * ) local cpu_type=" ${machine_hardware_name} " ;;
199+ esac
200+
201+ echo " $( uname | tr ' [:upper:]' ' [:lower:]' ) -${cpu_type} "
192202}
193203
194204get_platform_uname_c_x86_64 () {
You can’t perform that action at this time.
0 commit comments