Skip to content

Instantly share code, notes, and snippets.

@ywkaras
Last active August 2, 2019 23:43
Show Gist options
  • Save ywkaras/4c6c43cc785610c350a6221a1aba040d to your computer and use it in GitHub Desktop.
Save ywkaras/4c6c43cc785610c350a6221a1aba040d to your computer and use it in GitHub Desktop.
Work-around shasum bash script for Au tests if shasum command missing but sha256sum present
if [[ -x /usr/bin/shasum ]] ; then
/usr/bin/shasum "$@"
echo "$?"
fi
if [[ ( "$1" != "-a" ) || ( "$2" != 256 ) ]] ; then
echo "first two parameters must be '-a 256'" 1>&1
exit 1
fi
shift 2
sha256sum "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment