scripts/docs in rvm-1.0.1 vs scripts/docs in rvm-1.0.2
- old
+ new
@@ -2,11 +2,11 @@
rvm_base_except="selector"
source "$rvm_scripts_path/base"
rvm_docs_ruby_string="$(__rvm_environment_identifier | awk -F"$rvm_gemset_separator" '{print $1}')"
if [[ "$rvm_docs_ruby_string" = "system" || -z "$rvm_docs_ruby_string" ]]; then
- $rvm_scripts_path/log "error" "Currently 'rvm docs ...' does not work with non-rvm rubies."
+ "$rvm_scripts_path"/log "error" "Currently 'rvm docs ...' does not work with non-rvm rubies."
exit 1
fi
rvm_docs_type="${rvm_docs_type:-rdoc}"
@@ -21,38 +21,38 @@
}
open_docs() {
if [[ -s "$rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type/index.html" ]] ; then
if command -v open >/dev/null ; then
- open $rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type/index.html
+ open "$rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type/index.html"
elif command -v xdg-open >/dev/null ; then
- xdg-open $rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type/index.html
+ xdg-open "$rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type/index.html"
else
- $rvm_scripts_path/log "error" "Neither open nor xdg-open were found, in order to open the docs one of these two are required. \n(OR you can let me know how else to open the html in your browser from comand line on your OS :) )"
+ "$rvm_scripts_path"/log "error" "Neither open nor xdg-open were found, in order to open the docs one of these two are required. \n(OR you can let me know how else to open the html in your browser from comand line on your OS :) )"
fi
else
- $rvm_scripts_path/log "error" "$rvm_docs_type docs are missing, perhaps run 'rvm docs generate' first?"
+ "$rvm_scripts_path"/log "error" "$rvm_docs_type docs are missing, perhaps run 'rvm docs generate' first?"
fi
}
generate_ri() {
# Generate ri docs
__rvm_pushpop "$rvm_src_path/$rvm_docs_ruby_string/"
- $rvm_scripts_path/log "info" "Generating ri documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
- $rvm_scripts_path/log "info" "( Errors will be logged to $rvm_log_path/$rvm_docs_ruby_string/docs.error.log )"
+ "$rvm_scripts_path"/log "info" "Generating ri documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
+ "$rvm_scripts_path"/log "info" "( Errors will be logged to $rvm_log_path/$rvm_docs_ruby_string/docs.error.log )"
rdoc -a --ri --ri-site > /dev/null 2>> $rvm_log_path/$rvm_docs_ruby_string/docs.error.log
__rvm_pushpop
}
generate_rdoc() {
__rvm_pushpop "$rvm_src_path/$rvm_docs_ruby_string/"
\rm -rf "$rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type/"
- $rvm_scripts_path/log "info" "Generating rdoc documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
- $rvm_scripts_path/log "info" "( Errors will be logged to $rvm_log_path/$rvm_docs_ruby_string/docs.error.log )"
+ "$rvm_scripts_path"/log "info" "Generating rdoc documentation, be aware that this could take a *long* time, and depends heavily on your system resources..."
+ "$rvm_scripts_path"/log "info" "( Errors will be logged to $rvm_log_path/$rvm_docs_ruby_string/docs.error.log )"
if gem list | \grep -q ^hanna ; then
- hanna -o $rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type --inline-source --line-numbers --fmt=html > /dev/null 2>> $rvm_log_path/$rvm_docs_ruby_string/docs.error.log
+ hanna -o "$rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type" --inline-source --line-numbers --fmt=html > /dev/null 2>> "$rvm_log_path/$rvm_docs_ruby_string/docs.error.log"
else
- rdoc -a -o $rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type > /dev/null 2>> $rvm_log_path/$rvm_docs_ruby_string/docs.error.log
+ rdoc -a -o "$rvm_docs_path/$rvm_docs_ruby_string/$rvm_docs_type" > /dev/null 2>> "$rvm_log_path/$rvm_docs_ruby_string/docs.error.log"
fi
__rvm_pushpop
}
case "$1" in