Checksums
Checksums copied to clipboard
Better error checking (unexpected results running with no/unknown parameters)
$ checksums.sh -help
/usr/bin/basename: illegal option -- h
usage: basename string [suffix]
basename [-a] [-s suffix] string [...]
mdls: unrecognized option `-help'
/usr/bin/stat: illegal option -- h
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
(standard_in) 1: parse error
(standard_in) 1: parse error
checksums.sh --help
/usr/bin/basename: illegal option -- -
usage: basename string [suffix]
basename [-a] [-s suffix] string [...]
mdls: unrecognized option `--help'
/usr/bin/stat: illegal option -- -
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
(standard_in) 1: parse error
(standard_in) 1: parse error
checksums.sh(no parameter)
stat: : stat: No such file or directory
(standard_in) 1: parse error
(standard_in) 1: parse error
Thanks for the input. Checksums will (hopefully sooner than later) be completely reworked into a Platypus application (with CLI-support via symlink into /usr/local/bin) including user preferences via Pashua, sfv support, checksum file support etc. That version will definitely be better at checking for errors.