summaryrefslogtreecommitdiff
path: root/shasum
blob: ce40ba2d0a12d5d933843e37e8668d4f6b98d1e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

for i; 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
"$PROGRAM" ${ARGS:+"$ARGS"}