Skip to content

Commit

Permalink
Installer seems to be a bit jacked up somehow... fixing.
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneeseguin committed Jul 14, 2010
1 parent 643d833 commit 376b141
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions scripts/install
Expand Up @@ -2,11 +2,6 @@

unset rvm_auto_flag

install_source_path=$(dirname $0)
if [[ -d "$install_source_path/scripts" ]] && [[ -s "$install_source_path/scripts/utility" ]] ; then
builtin cd $install_source_path
fi

source scripts/version
source scripts/utility

Expand Down Expand Up @@ -82,7 +77,12 @@ __rvm_initialize
item="$(tput setaf 2)* $(tput sgr0)"
question="\n$(tput setaf 2)<?>$(tput sgr0)"
cwd=$(pwd)
source_path="${source_path:-$cwd}"
install_source_path=$(dirname $0)
if [[ -d "$install_source_path/scripts" ]] && [[ -s "$install_source_path/scripts/utility" ]] ; then
builtin cd $install_source_path
else
install_source_path="${install_source_path:-$cwd}"
fi
rvm_archives_path="${rvm_archives_path:-"$rvm_path/archives"}"
rvm_src_path="${rvm_src_path:-"$rvm_path/src"}"
rvm_log_path="${rvm_log_path:-"$rvm_path/log"}"
Expand Down Expand Up @@ -118,17 +118,17 @@ mkdir -p $rvm_archives_path $rvm_src_path $rvm_log_path $rvm_bin_path $rvm_gems_

for file in README LICENCE ; do
spinner
cp -f "$source_path/$file" "$rvm_path/"
cp -f "$install_source_path/$file" "$rvm_path/"
done

#
# Scripts
#
for dir_name in config scripts examples lib hooks help patches; do
for dir_name in config scripts examples lib hooks help patches man ; do
spinner
mkdir -p "$rvm_path/$dir_name"
if [[ -d "$source_path/$dir_name" ]] ; then
cp -Rf "$source_path/$dir_name" "$rvm_path"
if [[ -d "$install_source_path/$dir_name" ]] ; then
cp -Rf "$install_source_path/$dir_name" "$rvm_path"
fi
done ; unset dir_name

Expand All @@ -151,7 +151,7 @@ done
for file in rvm-prompt rvm rvmsudo rvm-shell ; do
spinner && perl -e 'sleep 0.2'
rm -f "$rvm_bin_path/$file"
cp -f "$source_path/binscripts/$file" $rvm_bin_path/
cp -f "$install_source_path/binscripts/$file" $rvm_bin_path/
done
spinner
chmod +x $rvm_bin_path/*
Expand Down Expand Up @@ -280,10 +280,8 @@ if [[ "$rvm_prefix" ]] || [[ "root" = "$(whoami)" ]] ; then
chmod +x $rvm_bin_path/rvm
chmod +x $rvm_bin_path/rvmsudo
chmod +x $rvm_bin_path/rvm-shell
printf "\n Copying manpages into place."
for man_file in $(\ls "$install_source_path/man"); do
cp -f "$install_source_path/man/$man_file" "$rvm_man_path/$man_file"
done
printf "\n Copying manpages into $rvm_man_path."
cp -Rf "$install_source_path/man" "$rvm_man_path"
fi

if [[ "$upgrade_flag" -eq 0 ]] ; then
Expand Down

0 comments on commit 376b141

Please sign in to comment.