fixed detect_os.sh again
This commit is contained in:
parent
4c34c127a6
commit
5953b84cff
86
detect_os.sh
86
detect_os.sh
@ -1,46 +1,46 @@
|
||||
usr/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
lude "cbuild/myprint.sh"
|
||||
include "cbuild/myprint.sh"
|
||||
|
||||
ction detect_os {
|
||||
local uname_result="$(uname -o)"
|
||||
# myprint "uname result: '$uname_result'"
|
||||
case "$uname_result" in
|
||||
Msys | Cygwin | MS/Windows)
|
||||
safeprint WINDOWS
|
||||
;;
|
||||
Linux | GNU/Linux | Android)
|
||||
safeprint LINUX
|
||||
;;
|
||||
FreeBSD)
|
||||
safeprint FREEBSD
|
||||
;;
|
||||
Darwin)
|
||||
safeprint MACOS
|
||||
;;
|
||||
*)
|
||||
error "unknown operating system: $uname_result"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
ction detect_arch {
|
||||
local uname_result="$(uname -m)"
|
||||
case "$uname_result" in
|
||||
arm | arm32 | armhf | aarch32)
|
||||
safeprint arm32
|
||||
;;
|
||||
arm64 | aarch64 | aarch64_be | armv8b | armv8l)
|
||||
safeprint arm64
|
||||
;;
|
||||
x86 | i386 | i486 | i686)
|
||||
safeprint x86
|
||||
;;
|
||||
x64 | x86_64 | amd64)
|
||||
safeprint x64
|
||||
;;
|
||||
*)
|
||||
error "unknown CPU architecture: $uname_result"
|
||||
;;
|
||||
esac
|
||||
function detect_os {
|
||||
local uname_result="$(uname -o)"
|
||||
# myprint "uname result: '$uname_result'"
|
||||
case "$uname_result" in
|
||||
Msys | Cygwin | MS/Windows)
|
||||
safeprint WINDOWS
|
||||
;;
|
||||
Linux | GNU/Linux | Android)
|
||||
safeprint LINUX
|
||||
;;
|
||||
FreeBSD)
|
||||
safeprint FREEBSD
|
||||
;;
|
||||
Darwin)
|
||||
safeprint MACOS
|
||||
;;
|
||||
*)
|
||||
error "unknown operating system: $uname_result"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function detect_arch {
|
||||
local uname_result="$(uname -m)"
|
||||
case "$uname_result" in
|
||||
arm | arm32 | armhf | aarch32)
|
||||
safeprint arm32
|
||||
;;
|
||||
arm64 | aarch64 | aarch64_be | armv8b | armv8l)
|
||||
safeprint arm64
|
||||
;;
|
||||
x86 | i386 | i486 | i686)
|
||||
safeprint x86
|
||||
;;
|
||||
x64 | x86_64 | amd64)
|
||||
safeprint x64
|
||||
;;
|
||||
*)
|
||||
error "unknown CPU architecture: $uname_result"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user