Ubuntu md5sum command disapproves of -q argument
Change-Id: Ibf10f1f9103dd270b3d62638fb428e1df43ee0e3
diff --git a/tools/package/onos-run-karaf b/tools/package/onos-run-karaf
index 3406b55..343210f 100755
--- a/tools/package/onos-run-karaf
+++ b/tools/package/onos-run-karaf
@@ -15,13 +15,14 @@
# Extract MD5 of the ONOS tar file and of the previous installation, if one exists
md5cmd=''
+md5cmdprm=''
case "$OSTYPE" in
- darwin*) md5cmd='md5' ;;
- *) md5cmd='md5sum' ;;
+ darwin*) md5cmd='md5' ; md5cmdprm='-q' ;;
+ *) md5cmd='md5sum';;
esac
oldMD5=$(cat $ONOS_MD5 2>/dev/null)
-newMD5=$(${md5cmd} -q $ONOS_TAR)
+newMD5=$(${md5cmd} ${md5cmdprm} $ONOS_TAR)
# Search for the "clean" argument anywhere on the command-line
echo "$@" | egrep -q "\bclean\b" && clean=true || unset clean