File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,35 +32,20 @@ get_platform() {
3232 log_err " uname -m return empty"
3333 fi
3434
35- # For linux arm64
36- if [[ " $arch " == aarch64 ]] || [[ $arch == arm64 ]] && [[ $OO_HOST_PLATFORM == " linux" ]]; then
37- platform=" linux_arm64"
38- return
39- fi
40-
41- # For linux x86_64
42- if [[ " $arch " == x86_64 ]] || [[ " $arch " == amd64 ]] && [[ $OO_HOST_PLATFORM == " linux" ]]; then
43- platform=" linux_amd64"
44- return
45- fi
46-
47- # For wsl2 amd64
48- if [[ " $arch " == x86_64 ]] || [[ " $arch " == amd64 ]] && [[ $OO_HOST_PLATFORM == " win32" ]]; then
49- platform=" wsl2_amd64"
50- return
51- fi
52-
53- # For MacOS-x86_64
54- if [[ " $arch " == x86_64 ]] || [[ " $arch " == amd64 ]] && [[ $OO_HOST_PLATFORM == " darwin" ]]; then
55- platform=" macos_amd64"
56- return
57- fi
58-
59- # For MacOS-aarch64
60- if [[ " $arch " == aarch64 ]] || [[ $arch == arm64 ]] && [[ $OO_HOST_PLATFORM == " darwin" ]]; then
61- platform=" macos_arm64"
62- return
63- fi
35+ case " $arch " in
36+ aarch64|arm64)
37+ platform=" linux_arm64"
38+ [[ " $OO_HOST_PLATFORM " == " darwin" ]] && platform=" macos_arm64"
39+ ;;
40+ x86_64|amd64)
41+ platform=" linux_amd64"
42+ [[ " $OO_HOST_PLATFORM " == " win32" ]] && platform=" wsl2_amd64"
43+ [[ " $OO_HOST_PLATFORM " == " darwin" ]] && platform=" macos_amd64"
44+ ;;
45+ * )
46+ log_err " unsupported architecture: $arch "
47+ ;;
48+ esac
6449}
6550
6651# Fallback to install native ffmpeg
You can’t perform that action at this time.
0 commit comments