3 5c2e310e 2021-01-22 op # USAGE: ./sha in out
4 5c2e310e 2021-01-22 op # writes the sha256 of in to file out
6 5c2e310e 2021-01-22 op if which sha256 2>/dev/null >/dev/null; then
7 5c2e310e 2021-01-22 op exec sha256 < "$1" > "$2"
10 5c2e310e 2021-01-22 op if which sha256sum 2>/dev/null >/dev/null; then
11 99f95f77 2021-01-22 op sha256sum "$1" | awk '{print $1}' > "$2"
15 5c2e310e 2021-01-22 op echo "No sha binary found"