rvm 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/rvm-install +1 -1
- data/bin/rvm-update +1 -1
- data/config/cache +23 -0
- data/{bash/rvmrc.sample → examples/rvmrc} +2 -0
- data/rvm.gemspec +8 -7
- data/scripts/rvm +1064 -0
- data/scripts/rvm-install +101 -0
- data/scripts/rvm-update +75 -0
- metadata +7 -6
- data/bash/rvm +0 -852
- data/bash/rvm-install +0 -111
- data/bash/rvm-update +0 -22
data/bash/rvm-install
DELETED
@@ -1,111 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
user=`whoami`
|
4
|
-
if [ "$user" = "root" ] ; then
|
5
|
-
echo -e "\033[0;31m <e> \033[0mroot user support is not yet implemented.\033[0m"
|
6
|
-
exit 1
|
7
|
-
fi
|
8
|
-
|
9
|
-
info="\n\033[0;32m<i>\033[0m"
|
10
|
-
question="\n\033[0;32m<?>\033[0m"
|
11
|
-
|
12
|
-
echo -e "Installing rvm source to ~/.rvm/bin/rvm..."
|
13
|
-
mkdir -p ~/.rvm/src ~/.rvm/bin
|
14
|
-
for script in rvm ; do # Preparing for refactoring.
|
15
|
-
cp "`dirname "${0}"`/$script" ~/.rvm/bin/
|
16
|
-
done
|
17
|
-
|
18
|
-
# State what is required to use rvm
|
19
|
-
echo -e "\n\033[0;32mrvm\033[0m is a shell script that allows a user to manage multiple ruby versions in their own account."
|
20
|
-
echo -e "$info In order to use rvm the following line must occur in your shell's loading files:"
|
21
|
-
echo -e "\n\033[0;32m (a)\033[0m if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi"
|
22
|
-
|
23
|
-
while : ; do
|
24
|
-
echo -n -e "$question Do you want this (s)cript to set this up for you, or do it (m)anually yourself ('s' or 'm')? "
|
25
|
-
read response
|
26
|
-
if [ "${response:0:1}" = "s" ] ; then
|
27
|
-
echo 'w00t!'
|
28
|
-
break
|
29
|
-
elif [ "${response:0:1}" = "m" ] ; then
|
30
|
-
echo -e "$info Please make sure that this line is in place."
|
31
|
-
break
|
32
|
-
fi
|
33
|
-
done
|
34
|
-
|
35
|
-
if [ "${response:0:1}" = "s" ] ; then
|
36
|
-
|
37
|
-
while : ; do
|
38
|
-
echo -n -e "$question Do you use b(a)sh or (z)sh or b(o)th for your shell (the default on most *nix systems is bash, press control + C to cancel the installation)\n(a/z/o)? "
|
39
|
-
read response
|
40
|
-
if [ "${response:0:1}" = "a" ] ; then
|
41
|
-
user_shell="bash"
|
42
|
-
break
|
43
|
-
elif [ "${response:0:1}" = "z" ] ; then
|
44
|
-
user_shell="zsh"
|
45
|
-
break
|
46
|
-
elif [ "${response:0:1}" = "o" ] ; then
|
47
|
-
user_shell="both"
|
48
|
-
break
|
49
|
-
fi
|
50
|
-
done
|
51
|
-
|
52
|
-
if [ "$user_shell" = "bash" -o "$user_shell" = "both" ] ; then
|
53
|
-
|
54
|
-
touch ~/.bash_profile
|
55
|
-
if [ -z "`grep '\.rvm/bin/rvm' ~/.bash_profile`" ] ; then
|
56
|
-
echo "Adding 'if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi' to your ~/.bash_profile."
|
57
|
-
echo "if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi" >> ~/.bash_profile
|
58
|
-
fi
|
59
|
-
touch ~/.bashrc
|
60
|
-
if [ -z "`grep '\.rvm/bin/rvm' ~/.bashrc`" ] ; then
|
61
|
-
echo "Adding 'if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi' to your ~/.bashrc."
|
62
|
-
echo "if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi" >> ~/.bashrc
|
63
|
-
fi
|
64
|
-
|
65
|
-
fi
|
66
|
-
|
67
|
-
if [ "$user_shell" = "zsh" -o "$user_shell" = "both" ] ; then
|
68
|
-
|
69
|
-
touch ~/.zshrc
|
70
|
-
if [ -z "`grep '\.rvm/bin/rvm' ~/.zshrc`" ] ; then
|
71
|
-
echo "Adding 'if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi' to your ~/.zshrc."
|
72
|
-
echo "if [ -f ~/.rvm/bin/rvm ] ; then source ~/.rvm/bin/rvm ; fi" >> ~/.zshrc
|
73
|
-
fi
|
74
|
-
fi
|
75
|
-
|
76
|
-
fi
|
77
|
-
|
78
|
-
system=`uname`
|
79
|
-
if [ "$system" = "Linux" ] ; then
|
80
|
-
rvm_apt_get_binary=`which apt-get`
|
81
|
-
rvm_emerge_binary=`which emerge`
|
82
|
-
rvm_pacman_binary=`which pacman`
|
83
|
-
rvm_yum_binary=`which yum`
|
84
|
-
|
85
|
-
echo -e "\033[0;33m <w> \033[0mFor jRuby (if you wish to use it) you will need:"
|
86
|
-
if [ ! -z "$rvm_apt_get_binary" ] ; then
|
87
|
-
echo -e "\033[0;32m <i> \033[0msudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk "
|
88
|
-
elif [ ! -z "$rvm_emerge_binary" ] ; then
|
89
|
-
echo -e "\033[0;32m <i> \033[0msudo emerge dev-java/sun-jdk dev-java/sun-jre-bin"
|
90
|
-
elif [ ! -z "$rvm_pacman_binary" ] ; then
|
91
|
-
echo -e "\033[0;32m <i> \033[0msudo pacman -Sy jdk jre"
|
92
|
-
elif [ ! -z "$rvm_yum_binary" ] ; then
|
93
|
-
echo -e "\033[0;32m <i> \033[0myum install -y rpm-build gcc gcc-c++ redhat-rpm-config ; then download and rpmbuild and install the sdk, Have fun..."
|
94
|
-
else
|
95
|
-
echo -e "\033[0;32m <i> \033[0mThe SUN java runtime environment and development kit."
|
96
|
-
fi
|
97
|
-
#elif [ "$sytem" = "Darwin" ] ; then
|
98
|
-
#else
|
99
|
-
fi
|
100
|
-
|
101
|
-
source ~/.rvm/bin/rvm
|
102
|
-
rvm symlinks
|
103
|
-
|
104
|
-
echo -e "\n$info If you add ~/.rvm/bin/ to your path you will be able to refer to installed ruby binaries using: <implementation>-<version><patchlevel>"
|
105
|
-
echo -e " For example: ruby-1.9.1-p243 -e 'puts \"hello world\"' #=> hello world"
|
106
|
-
echo -e "$info Contact wayneeseguin on irc.freenode.net in #rvm for any questions / feedback."
|
107
|
-
echo -e " I truly hope that you find rvm helpful! Thank you very much for using rvm. \n"
|
108
|
-
echo -e " ~ Wayne"
|
109
|
-
|
110
|
-
echo -e "$info To start using rvm see: \033[0;32m rvm usage\033[0m, Now close this login shell and open a new one."
|
111
|
-
|
data/bash/rvm-update
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
user=`whoami`
|
4
|
-
if [ "$user" = "root" ] ; then
|
5
|
-
echo -e "\033[0;31m <e> \033[0mroot user support is not implemented yet.\033[0m"
|
6
|
-
exit 1
|
7
|
-
fi
|
8
|
-
|
9
|
-
info="\n\033[0;32m<i>\033[0m"
|
10
|
-
|
11
|
-
echo -e "$info Updating rvm source ~/.rvm/bin/rvm ..."
|
12
|
-
mkdir -p ~/.rvm/src ~/.rvm/bin
|
13
|
-
for script in rvm ; do # Prepairing for refactoring.
|
14
|
-
cp "`dirname "${0}"`/$script" ~/.rvm/bin/
|
15
|
-
done
|
16
|
-
|
17
|
-
echo -e "\n Thank you, come again! \n"
|
18
|
-
echo -e " ~ Wayne"
|
19
|
-
|
20
|
-
source ~/.rvm/bin/rvm
|
21
|
-
rvm symlinks
|
22
|
-
|