Permalink
Browse files

Config path configurable.

  • Loading branch information...
1 parent 7792c23 commit d8be01a88c635dd7dfe5273e6fb1bcca8ad57af1 @wayneeseguin wayneeseguin committed Feb 25, 2011
Showing with 89 additions and 89 deletions.
  1. +6 −6 scripts/alias
  2. +5 −5 scripts/docs
  3. +5 −5 scripts/fetch
  4. +3 −3 scripts/gemsets
  5. +2 −2 scripts/info
  6. +5 −5 scripts/install
  7. +7 −7 scripts/list
  8. +21 −21 scripts/manage
  9. +1 −1 scripts/migrate
  10. +4 −4 scripts/package
  11. +1 −1 scripts/patches
  12. +1 −1 scripts/repair
  13. +7 −7 scripts/selector
  14. +4 −4 scripts/snapshot
  15. +16 −16 scripts/utility
  16. +1 −1 test/unit/selector_test
View
@@ -52,7 +52,7 @@ alias_show() {
return
fi
- expanded_alias_name="$("$rvm_scripts_path"/db "$rvm_path/config/alias" "$alias_name")"
+ expanded_alias_name="$("$rvm_scripts_path"/db "$rvm_config_path/alias" "$alias_name")"
if [[ -z "$expanded_alias_name" ]]; then
rvm_error "Unknown alias name: '$alias_name'"
@@ -74,7 +74,7 @@ alias_delete() {
if [[ -L "$link" ]] ; then rm -f $link ; fi
done
- "$rvm_scripts_path"/db "$rvm_path/config/alias" "$alias_name" "delete"
+ "$rvm_scripts_path"/db "$rvm_config_path/alias" "$alias_name" "delete"
}
alias_create() {
@@ -134,7 +134,7 @@ alias_create() {
rvm_log "Recording alias $alias_name for $final_environment_identifier."
- "$rvm_scripts_path"/db "$rvm_path/config/alias" "$alias_name" "$final_environment_identifier"
+ "$rvm_scripts_path"/db "$rvm_config_path/alias" "$alias_name" "$final_environment_identifier"
else
@@ -163,7 +163,7 @@ alias_list() {
for item in "${items[@]}" ; do
- echo "$(basename "$item") => $("$rvm_scripts_path"/db "$rvm_path/config/alias" "$(basename "$item")")"
+ echo "$(basename "$item") => $("$rvm_scripts_path"/db "$rvm_config_path/alias" "$(basename "$item")")"
done
@@ -176,7 +176,7 @@ rvm_environment_identifier="${args[2]:-""}"
args="$(echo ${args[@]:3}) " # Strip trailing / leading / extra spacing.
result=0
-if [[ ! -f "$rvm_path/config/alias" ]] ; then touch "$rvm_path/config/alias" ; fi
+if [[ ! -f "$rvm_config_path/alias" ]] ; then touch "$rvm_config_path/alias" ; fi
if printf "$alias_name" | grep -q "${rvm_gemset_separator:-"@"}" ; then
gemset_name="${alias_name/*${rvm_gemset_separator:-"@"}/}"
@@ -186,7 +186,7 @@ else
fi
if [[ -n "$alias_name" ]] ; then
- rvm_alias="$("$rvm_scripts_path/db" "$rvm_path/config/alias" "$alias_name")"
+ rvm_alias="$("$rvm_scripts_path/db" "$rvm_config_path/alias" "$alias_name")"
fi
case "$action" in
View
@@ -67,9 +67,9 @@ generate_ri()
rvm_log "Generating ri documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
- rvm_log "( Errors will be logged to ${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.log )"
+ rvm_log "( Errors will be logged to ${rvm_log_path}/$rvm_docs_ruby_string/docs.log )"
- rdoc -a --ri --ri-site > /dev/null 2>> ${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.log
+ rdoc -a --ri --ri-site > /dev/null 2>> ${rvm_log_path}/$rvm_docs_ruby_string/docs.log
)
}
@@ -82,15 +82,15 @@ generate_rdoc()
rvm_log "Generating rdoc documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
- rvm_log "( Errors will be logged to ${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.log )"
+ rvm_log "( Errors will be logged to ${rvm_log_path}/$rvm_docs_ruby_string/docs.log )"
if gem list | \grep -q ^hanna ; then
- hanna -o "${rvm_docs_path:-"$rvm_path/docs"}/$rvm_docs_ruby_string/$rvm_docs_type" --inline-source --line-numbers --fmt=html > /dev/null 2>> "${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.log"
+ hanna -o "${rvm_docs_path:-"$rvm_path/docs"}/$rvm_docs_ruby_string/$rvm_docs_type" --inline-source --line-numbers --fmt=html > /dev/null 2>> "${rvm_log_path}/$rvm_docs_ruby_string/docs.log"
else
- rdoc -a -o "${rvm_docs_path:-"$rvm_path/docs"}/$rvm_docs_ruby_string/$rvm_docs_type" > /dev/null 2>> "${rvm_log_path:-"$rvm_path/log"}/$rvm_docs_ruby_string/docs.log"
+ rdoc -a -o "${rvm_docs_path:-"$rvm_path/docs"}/$rvm_docs_ruby_string/$rvm_docs_type" > /dev/null 2>> "${rvm_log_path}/$rvm_docs_ruby_string/docs.log"
fi
)
View
@@ -28,7 +28,7 @@ record_md5()
;;
esac
- "$rvm_scripts_path/db" "$rvm_path/config/md5" "$archive" "$archive_md5"
+ "$rvm_scripts_path/db" "$rvm_config_path/md5" "$archive" "$archive_md5"
}
@@ -78,7 +78,7 @@ fi
[[ ${rvm_debug_flag:-0} -gt 0 ]] && rvm_debug "Fetching $archive"
# Check first if we have the correct archive
-archive_md5="$("$rvm_scripts_path/db" "$rvm_path/config/md5" "$archive" | head -n1)"
+archive_md5="$("$rvm_scripts_path/db" "$rvm_config_path/md5" "$archive" | head -n1)"
if [[ -e "$archive" && ! -z "$archive_md5" ]] ; then
@@ -152,7 +152,7 @@ if [[ $download -gt 0 ]] ; then
else
- rvm_error "There was an error, please check ${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/*.log. Next we'll try to fetch via http."
+ rvm_error "There was an error, please check ${rvm_log_path}/$rvm_ruby_string/*.log. Next we'll try to fetch via http."
try_http=1
@@ -164,7 +164,7 @@ if [[ $download -gt 0 ]] ; then
if [[ $result -gt 0 ]] ; then
- rvm_error "There was an error, please check ${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/*.log"
+ rvm_error "There was an error, please check ${rvm_log_path}/$rvm_ruby_string/*.log"
else
@@ -182,7 +182,7 @@ if [[ $download -gt 0 ]] ; then
if [[ $result -gt 0 ]] ; then
- rvm_error "There was an error, please check ${rvm_log_path:-"$rvm_path/log"}/$rvm_ruby_string/*.log"
+ rvm_error "There was an error, please check ${rvm_log_path}/$rvm_ruby_string/*.log"
else
View
@@ -106,7 +106,7 @@ gemset_globalcache()
fi
done
- "$rvm_scripts_path/db" "$rvm_path/config/user" \
+ "$rvm_scripts_path/db" "$rvm_config_path/user" \
"use_gemset_globalcache" "delete"
elif [[ "$1" == "enable" ]]; then
@@ -137,7 +137,7 @@ gemset_globalcache()
done
- "$rvm_scripts_path/db" "$rvm_path/config/user" \
+ "$rvm_scripts_path/db" "$rvm_config_path/user" \
"use_gemset_globalcache" "true"
else
@@ -782,7 +782,7 @@ gem_install()
else
- rvm_log "$gem_name $gem_version failed to install ( output logged to: $rvm_path/log/$rvm_ruby_string/gem.install.log )"
+ rvm_log "$gem_name $gem_version failed to install ( output logged to: $rvm_log_path/$rvm_ruby_string/gem.install.log )"
fi
fi
View
@@ -129,11 +129,11 @@ $(__rvm_version)
if [[ "$rvm_selfcontained" = "0" ]] ; then
- debug_files=("$rvm_path/config/alias" "$rvm_path/config/system" "$rvm_path/config/db" "/etc/rvmrc" "/etc/gemrc")
+ debug_files=("$rvm_config_path/alias" "$rvm_config_path/system" "$rvm_config_path/db" "/etc/rvmrc" "/etc/gemrc")
else
- debug_files=("$rvm_path/config/alias" "$rvm_path/config/system" "$rvm_path/config/db" "$HOME/.rvmrc" "$HOME/.gemrc")
+ debug_files=("$rvm_config_path/alias" "$rvm_config_path/system" "$rvm_config_path/db" "$HOME/.rvmrc" "$HOME/.gemrc")
fi
View
@@ -348,9 +348,9 @@ for dir_name in config scripts examples lib hooks help patches; do
done
-if [[ ! -s "$rvm_path/config/user" ]] ; then
+if [[ ! -s "$rvm_config_path/user" ]] ; then
echo '# User settings, overrides db settings and persists across installs.' \
- >> "$rvm_path/config/user"
+ >> "$rvm_config_path/user"
fi
scripts=(monitor match log install color db fetch log set package)
@@ -595,9 +595,9 @@ for gemset in "$rvm_path"/gems/*\@ ; do
done
# Move from legacy defaults to the new, alias based system.
-if [[ -s "$rvm_path/config/default" ]]; then
+if [[ -s "$rvm_config_path/default" ]]; then
- original_version="$(basename "$(grep GEM_HOME "$rvm_path/config/default" \
+ original_version="$(basename "$(grep GEM_HOME "$rvm_config_path/default" \
| awk -F"'" '{print $2}' | sed "s#\%#${rvm_gemset_separator:-"@"}#")")"
if [[ -n "$original_version" ]]; then
@@ -606,7 +606,7 @@ if [[ -s "$rvm_path/config/default" ]]; then
fi ; unset original_version
- rm -rf "$rvm_path/config/default"
+ rm -rf "$rvm_config_path/default"
fi
View
@@ -70,9 +70,9 @@ list_gemsets()
done
- if [[ -f "$rvm_path/config/default" && -s "$rvm_path/config/default" ]] ; then
+ if [[ -f "$rvm_config_path/default" && -s "$rvm_config_path/default" ]] ; then
- version=$(grep 'MY_RUBY_HOME' "$rvm_path/config/default" | head -n1 | awk -F"'" '{print $2}' | xargs basename --)
+ version=$(grep 'MY_RUBY_HOME' "$rvm_config_path/default" | head -n1 | awk -F"'" '{print $2}' | xargs basename --)
if [[ -n "$version" ]] ; then
@@ -184,7 +184,7 @@ list_gemset_strings()
# This is meant to be used with scripting.
list_known_strings()
{
- sed -e 's/#.*$//g' -e 's#\[##g' -e 's#\]##g' < "$rvm_path/config/known" | sort -r | uniq
+ sed -e 's/#.*$//g' -e 's#\[##g' -e 's#\]##g' < "$rvm_config_path/known" | sort -r | uniq
return $?
}
@@ -200,11 +200,11 @@ list_known()
if [[ ${rvm_interactive_flag:-0} -eq 0 ]] ; then
- cat "$rvm_path/config/known"
+ cat "$rvm_config_path/known"
else
- eval "${PAGER:-less -X} '$rvm_path/config/known'"
+ eval "${PAGER:-less -X} '$rvm_config_path/known'"
fi
@@ -265,9 +265,9 @@ list_rubies()
done
- if [[ -f "$rvm_path/config/default" ]] && [[ -s "$rvm_path/config/default" ]] ; then
+ if [[ -f "$rvm_config_path/default" ]] && [[ -s "$rvm_config_path/default" ]] ; then
- version=$(grep 'MY_RUBY_HOME' "$rvm_path/config/default" | head -n 1 | awk -F"'" '{print $2}' | xargs basename --)
+ version=$(grep 'MY_RUBY_HOME' "$rvm_config_path/default" | head -n 1 | awk -F"'" '{print $2}' | xargs basename --)
if [[ -n "$version" ]] ; then
Oops, something went wrong.

0 comments on commit d8be01a

Please sign in to comment.