Skip to content

Instantly share code, notes, and snippets.

@Ch00k
Last active December 22, 2015 00:59
Show Gist options
  • Select an option

  • Save Ch00k/6393287 to your computer and use it in GitHub Desktop.

Select an option

Save Ch00k/6393287 to your computer and use it in GitHub Desktop.
diff --git a/scripts/functions/autolibs b/scripts/functions/autolibs
index fa5df6e..b37ef74 100755
--- a/scripts/functions/autolibs
+++ b/scripts/functions/autolibs
@@ -2,7 +2,6 @@
__rvm_autolibs_translate()
{
- [[ -n "$_system_name" ]] || __rvm_detect_system
case "${rvm_autolibs_flag}" in
(0|disable|disabled)
rvm_autolibs_flag_number=0
diff --git a/scripts/functions/utility_system b/scripts/functions/utility_system
index ebb88c2..7994987 100644
--- a/scripts/functions/utility_system
+++ b/scripts/functions/utility_system
@@ -153,11 +153,11 @@ __rvm_detect_system()
_system_arch="${_system_arch/i[123456789]86/i386}"
}
+__rvm_detect_system
+
__system_and_version_is()
{
- _system=$(uname)
- _version=$(uname -r)
- [[ ${_system} == "$1" && ${_version} == "$2" ]] || return $?
+ [[ ${_system_name} == "$1" && ${_system_version} == "$2" ]] || return $?
}
# params: [printf_if=-] [suffix]
@@ -165,10 +165,7 @@ __rvm_system_path()
{
rvm_remote_server_path="$(__rvm_db "rvm_remote_server_path${2:-}")"
[[ -n "${rvm_remote_server_path}" ]] ||
- if __rvm_detect_system
- then rvm_remote_server_path="${_system_name}/${_system_version}/${_system_arch}"
- else return $?
- fi
+ rvm_remote_server_path="${_system_name}/${_system_version}/${_system_arch}"
if [[ "${1:-}" == "-" ]]
then printf "%b" "${rvm_remote_server_path}\n"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment