-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·149 lines (110 loc) · 2.32 KB
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#!/usr/bin/env bash
export PS4 PATH
PS4="+ \${BASH_SOURCE##\${rvm_path:-}} : \${FUNCNAME[0]:+\${FUNCNAME[0]}()} \${LINENO} > "
set -o errtrace
if [[ "$*" =~ --trace ]] || (( ${rvm_trace_flag:-0} > 0 ))
then # Tracing, if asked for.
set -o xtrace
export rvm_trace_flag=1
fi
#Handle Solaris Hosts
if [[ "$(uname -s)" == "SunOS" ]]
then
PATH="/usr/gnu/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH"
elif [[ "$(uname)" == "OpenBSD" ]]
then
# don't touch PATH,
true
else
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:$PATH"
fi
if [[ -n "${rvm_user_path_prefix:-}" ]]
then
PATH="${rvm_user_path_prefix}:$PATH"
fi
shopt -s extglob
source "$PWD/scripts/functions/installer"
# source "$PWD/scripts/rvm"
#
# RVM Installer
#
install_setup
true ${DESTDIR:=}
# Parse RVM Installer CLI arguments.
while (( $# > 0 ))
do
token="$1"
shift
case "$token" in
(--auto)
rvm_auto_flag=1
;;
(--path)
rvm_path="$1"
shift
;;
(--version)
rvm_path="${PWD%%+(\/)}"
__rvm_version
unset rvm_path
exit
;;
(--debug)
export rvm_debug_flag=1
set -o verbose
;;
(--trace)
set -o xtrace
export rvm_trace_flag=1
echo "$@"
env | GREP_OPTIONS="" \grep '^rvm_'
export PS4="+ \${BASH_SOURCE##\${rvm_path:-}} : \${FUNCNAME[0]:+\${FUNCNAME[0]}()} \${LINENO} > "
;;
(--help)
install_usage
exit 0
;;
(*)
echo "Unrecognized option: $token"
install_usage
exit 1
;;
esac
done
if [[ -n "${DESTDIR}" ]]
then
rvm_prefix="${DESTDIR}"
fi
determine_install_path
determine_install_or_upgrade
if [[ -z "${rvm_path:-}" ]]
then
echo "ERROR: rvm_path is empty, halting installation."
exit 1
fi
export rvm_prefix rvm_path rvm_debug_flag rvm_trace_flag
create_install_paths
print_install_header
configure_installation
cleanse_old_entities
install_rvm_files
install_rvm_hooks
ensure_scripts_are_executable
setup_configuration_files
install_binscripts
install_gemsets
install_patchsets
cleanse_old_environments
migrate_old_gemsets
migrate_defaults
correct_binary_permissions
install_man_pages
root_canal
setup_rvmrc
setup_user_profile
record_ruby_configs
update_gemsets_install_rvm
cleanup_tmp_files
display_notes
display_thank_you
record_installation_time