Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add openbsd detection code

  • Loading branch information...
commit 7cf062d0b57e01b5af5fa476fbd45fdd47060ab3 1 parent 8299ae1
@mpapis mpapis authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 scripts/functions/utility
View
11 scripts/functions/utility
@@ -403,11 +403,10 @@ __rvm_detect_system()
_system_type="unknown"
_system_name="unknown"
_system_version="unknown"
- _system_arch="unknown"
+ _system_arch="$(uname -m)"
case "$(uname)" in
(Linux)
_system_type="linux"
- _system_arch="$(uname -m | awk '{if($0~"^i[34567]86") print "i386"; else print;}')"
if
[[ -f /etc/lsb-release ]] &&
GREP_OPTIONS="" \grep "DISTRIB_ID=Ubuntu" /etc/lsb-release >/dev/null
@@ -467,12 +466,16 @@ __rvm_detect_system()
return 3
fi
;;
+ (OpenBSD)
+ _system_type="bsd"
+ _system_name="openbsd"
+ _system_version="$(uname -r)"
+ ;;
(Darwin)
_system_type="darwin"
_system_name="osx"
_system_version="$(sw_vers -productVersion)"
_system_version="${_system_version%.*}" # only major.minor - teeny is ignored
- _system_arch="$(uname -m | awk '{if($0~"^i[34567]86") print "i386"; else print;}')"
;;
(*)
return 1
@@ -482,6 +485,8 @@ __rvm_detect_system()
_system_name="${_system_name//[ \/]/_}"
_system_version="${_system_version//[ \/]/_}"
_system_arch="${_system_arch//[ \/]/_}"
+ _system_arch="${_system_arch/amd64/x86_64}"
+ _system_arch="${_system_arch/i[123456789]86/i386}"
}
# params: [printf_if=-] [suffix]
Please sign in to comment.
Something went wrong with that request. Please try again.