summaryrefslogtreecommitdiff
path: root/shasum
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2022-10-09 01:19:04 -0500
committerzachir <zachir@librem.one>2022-10-09 01:19:04 -0500
commit0ad890bae271b17a7eaf76f70b2c462e4ca10333 (patch)
treee81457c2d4cf414a66edb010b4cfbc2e0974e400 /shasum
parentd36e7cd095371deb8b70115fc7817d351bcfa645 (diff)
reorganize .local/bin folder
Diffstat (limited to 'shasum')
-rwxr-xr-xshasum22
1 files changed, 22 insertions, 0 deletions
diff --git a/shasum b/shasum
new file mode 100755
index 0000000..18efefd
--- /dev/null
+++ b/shasum
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+for i in "$@"; do
+ case $i in
+ "-a") BITS="y"
+ continue
+ ;;
+ *)
+ ARGS="$i "
+ ;;
+ esac
+ if [ -n "$BITS" ]; then
+ case $i in
+ 256|512)
+ PROGRAM="sha"$i"sum"
+ ;;
+ esac
+ unset BITS
+ fi
+done
+cat - | "$PROGRAM" $ARGS
+echo "$PROGRAM $ARGS"