scripts/md5 in rvm-0.1.41 vs scripts/md5 in rvm-0.1.42
- old
+ new
@@ -1,19 +1,18 @@
#!/usr/bin/env bash
if [[ "$rvm_trace_flag" -eq 1 ]] ; then set -x ; export rvm_trace_flag ; fi
-file=$1 ; md5=$2
+file="$1"
+md5="$2"
if [[ "Linux" = "$(uname)" ]] ; then
command="md5sum"
- #md5sum --status -c "$file"
elif [[ "Darwin" = "$(uname)" ]] ; then
- #md5 --status -c "$1"
- command="/sbin/md5"
+ command="/sbin/md5 -q"
fi
-file_md5=$($command $file | awk '{print $NF}')
+file_md5=$($command "$file" | awk '{print $1}')
if [[ "$file_md5" = "$md5" ]] ; then
exit 0
else
exit 1