summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-03-28 14:53:42 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-03-28 14:53:42 +0200
commit0089f52549024a74c66dccd592e6774c18210ea6 (patch)
treee8a531ad8dcc8ddb15af5090c13e66169bba9d37
parentaf7079fd5fd0139bddad4529a03133a71b904eda (diff)
modify to work under Linux
-rwxr-xr-xscripts/sha256sum10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/sha256sum b/scripts/sha256sum
index 3c0a706c7..da34d9113 100755
--- a/scripts/sha256sum
+++ b/scripts/sha256sum
@@ -2,6 +2,10 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
-tmp=$(mktemp -t yyy)
-cat - > $tmp
-shasum -a 256 "$@" $tmp
+if [ -x /usr/bin/sha256sum ]; then
+ /usr/bin/sha256sum "$@"
+else
+ tmp=$(mktemp -t yyy)
+ cat - > $tmp
+ shasum -a 256 "$@" $tmp
+fi