misc: cleanup

This commit is contained in:
Dylan Araps 2018-06-04 07:36:56 +10:00
parent 23d02ae90e
commit 05b0d1055b

View file

@ -773,24 +773,24 @@ get_os() {
# $kernel_name is set in a function called cache_uname and is # $kernel_name is set in a function called cache_uname and is
# just the output of "uname -s". # just the output of "uname -s".
case "$kernel_name" in case "$kernel_name" in
"Darwin") os="$(sw_vers -productName)" ;; "Darwin") : "$(sw_vers -productName)" ;;
"SunOS") os="Solaris" ;; "SunOS") : "Solaris" ;;
"Haiku") os="Haiku" ;; "Haiku") : "Haiku" ;;
"MINIX") os="MINIX" ;; "MINIX") : "MINIX" ;;
"AIX") os="AIX" ;; "AIX") : "AIX" ;;
"IRIX"*) os="IRIX" ;; "IRIX"*) : "IRIX" ;;
"FreeMiNT") os="FreeMiNT" ;; "FreeMiNT") : "FreeMiNT" ;;
"Linux" | "GNU"*) "Linux" | "GNU"*)
os="Linux" : "Linux"
;; ;;
*"BSD" | "DragonFly" | "Bitrig") *"BSD" | "DragonFly" | "Bitrig")
os="BSD" : "BSD"
;; ;;
"CYGWIN"* | "MSYS"* | "MINGW"*) "CYGWIN"* | "MSYS"* | "MINGW"*)
os="Windows" : "Windows"
;; ;;
*) *)
@ -799,6 +799,7 @@ get_os() {
exit 1 exit 1
;; ;;
esac esac
os="$_"
} }
get_distro() { get_distro() {
@ -1000,7 +1001,8 @@ get_distro() {
# Get OS architecture. # Get OS architecture.
case "$os" in case "$os" in
"Solaris" | "AIX" | "Haiku" | "IRIX" | "FreeMiNT") machine_arch="$(uname -p)" ;; "Solaris" | "AIX" | "Haiku" | "IRIX" | "FreeMiNT")
machine_arch="$(uname -p)" ;;
*) machine_arch="$kernel_machine" ;; *) machine_arch="$kernel_machine" ;;
esac esac
@ -1319,8 +1321,7 @@ get_packages() {
;; ;;
"IRIX") "IRIX")
tot versions -b tot versions -b && ((packages-=3))
((packages-=3))
;; ;;
esac esac