summaryrefslogtreecommitdiff
path: root/scripts/sha256sum
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/sha256sum')
-rwxr-xr-xscripts/sha256sum11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/sha256sum b/scripts/sha256sum
new file mode 100755
index 000000000..da34d9113
--- /dev/null
+++ b/scripts/sha256sum
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+if [ -x /usr/bin/sha256sum ]; then
+ /usr/bin/sha256sum "$@"
+else
+ tmp=$(mktemp -t yyy)
+ cat - > $tmp
+ shasum -a 256 "$@" $tmp
+fi