scripts/fetch in rvm-0.0.97 vs scripts/fetch in rvm-0.0.98

- old
+ new

@@ -11,26 +11,26 @@ if [[ -z "$1" ]] ; then $rvm_scripts_path/log "fail" "BUG: $0 called without an argument :/" ; exit 1 ; fi archive=$(basename "$1") ; downlaod=1 -(( $rvm_debug_flag )) && $rvm_scripts_path/log "debug" "Fetching $archive" +if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "Fetching $archive" ; fi # Check first if we have the correct archive archive_md5="$($rvm_scripts_path/db "$rvm_config_path/md5" "$archive")" if [[ -e "$archive" ]] && [[ ! -z "$archive_md5" ]] ; then - (( $rvm_debug_flag )) && $rvm_scripts_path/log "debug" "Found archive and its md5, testing correctness" + if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "Found archive and its md5, testing correctness" ; fi if [[ $($rvm_scripts_path/md5 $archive $archive_md5) -gt 0 ]] ; then - (( $rvm_debug_flag )) && $rvm_scripts_path/log "debug" "Archive is bad, downloading" + if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "Archive is bad, downloading" ; fi download=1 else - (( $rvm_debug_flag )) && $rvm_scripts_path/log "debug" "Archive is good, not downloading" + if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "Archive is good, not downloading" ; fi download=0 result=0 fi ; unset archive_md5 else - (( $rvm_debug_flag )) && $rvm_scripts_path/log "debug" "No archive or no MD5, downloading" + if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "No archive or no MD5, downloading" ; fi download=1 fi if [[ $download -gt 0 ]] ; then eval $fetch_command "$1" @@ -42,10 +42,10 @@ elif [[ $result -eq 18 ]] ; then $rvm_scripts_path/log "error" "Partial file. Only a part of the file was transferred. Removing partial and re-trying." rm -f "$archive" retry=1 elif [[ $result -eq 33 ]] ; then - (( $rvm_debug_flag )) && $rvm_scripts_path/log "debug" "Server does not support 'range' command, removing '$archive'" + if [[ ! -z "$rvm_debug_flag" ]] ; then $rvm_scripts_path/log "debug" "Server does not support 'range' command, removing '$archive'" ; fi rm -f "$archive" retry=1 else $rvm_scripts_path/log "error" "There was an error, please check $rvm_ruby_log_path/*.error.log" fi