|
|
|
@ -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))
|
|
|
|
|