diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..093ff17 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# git add --renormalize . +*.sh text eol=lf diff --git a/detect_os.sh b/detect_os.sh index 2264723..6aeca22 100644 --- a/detect_os.sh +++ b/detect_os.sh @@ -1,46 +1,46 @@ -!/usr/bin/env bash - -nclude "cbuild/myprint.sh" - -unction 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 - - -unction 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 - +usr/bin/env bash + +lude "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 +