Added a really simple help option.

dev
Emily Frost 5 years ago
parent d2108eb528
commit d1a9a76687
Signed by: Emily
GPG Key ID: AA5D42849F1CBDC9

@ -1,8 +1,7 @@
#!/bin/bash #!/bin/bash
optstring="o:" optstring="o:h"
declare -i abort=0 declare -i abort=0
# TODO: Add help option to display usage.
# TODO: Consider a switch for per-file progress bars rather than a whole-operation one. # TODO: Consider a switch for per-file progress bars rather than a whole-operation one.
if [ ! -e "$(which pv)" ]; then if [ ! -e "$(which pv)" ]; then
@ -14,6 +13,7 @@ while getopts ${optstring} args; do
case $args in case $args in
o) output_file=${OPTARG} ;; o) output_file=${OPTARG} ;;
:) echo "Output file required." ;; :) echo "Output file required." ;;
h) echo "Usage: nyan -o [OUTPUT FILE] [INPUT FILE]..." && exit 0 ;;
esac esac
done done
shift $((OPTIND-1)) shift $((OPTIND-1))

Loading…
Cancel
Save