diff options
author | zachir <zachir@librem.one> | 2025-08-30 01:09:18 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2025-08-30 01:09:18 -0500 |
commit | f28d694879239d5d9c319185a278236d317a49b6 (patch) | |
tree | 3f684e05c6372c8f0fc0b9f126a184f3aaad68d4 /shasum | |
parent | 7d3cbe8f708772e40608260590b717dea6735908 (diff) |
Make sh scrips POSIX compliant
Using shellcheck, I went through all of them to make them standards
compliant. I also tested as many as I could.
Diffstat (limited to 'shasum')
-rwxr-xr-x | shasum | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -1,22 +1,21 @@ #!/bin/sh -for i in "$@"; do +for i; do case $i in "-a") BITS="y" continue ;; *) - ARGS="$i " + ARGS="$i" ;; esac if [ -n "$BITS" ]; then - case $i in + case "$i" in 256|512) - PROGRAM="sha"$i"sum" + PROGRAM="sha${i}sum" ;; esac unset BITS fi done -cat - | "$PROGRAM" $ARGS -echo "$PROGRAM $ARGS" +"$PROGRAM" ${ARGS:+"$ARGS"} |