Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[split] OpenSSL v0.9 and v1.0 have different output for the md5 subco…

…mmand Check to see what version of OpenSSL the 'openssl version' subcommand returns, then trim the output if necessary.

I had MacPorts' OpenSSL in the path (which is version 1.0.1c), and the output from its md5 is different than the one in `/usr/bin/openssl`:

```
$ /usr/bin/openssl md5 < sbt-launch.jar
2886cc391e38fa233b3e6c0ec9adfa1e

$ /opt/local/bin/openssl md5 < sbt-launch.jar
(stdin)= 2886cc391e38fa233b3e6c0ec9adfa1e
```

This patch just checks the output of the version subcommand and adjusts as appropriate.
Github-pull-request: #88

Signed-off-by: marius a. eriksen <marius@twitter.com>

RB_ID=70872
  • Loading branch information...
commit 10c25617ea72c082be0b82bd918a64b39d9a7c18 1 parent 2e16dfe
Jonathan Simms authored mariusae committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 sbt
View
5 sbt
@@ -13,7 +13,10 @@ if [ ! -f $sbtjar ]; then
fi
test -f $sbtjar || exit 1
-if [ $(openssl md5 < $sbtjar) != 2886cc391e38fa233b3e6c0ec9adfa1e ]; then
+
+sbtjar_md5=$(openssl md5 < $sbtjar|cut -f2 -d'='|awk '{print $1}')
+
+if [ "${sbtjar_md5}" != 2886cc391e38fa233b3e6c0ec9adfa1e ]; then
echo 'bad sbtjar!' 1>&2
exit 1
fi
Please sign in to comment.
Something went wrong with that request. Please try again.