From d2108eb52848ac80de1ae2032c612bad353f24ba Mon Sep 17 00:00:00 2001 From: Emily Frost Date: Tue, 29 Jun 2021 11:39:38 -0500 Subject: [PATCH] nyan now checks that pv exists before starting. --- nyan | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nyan b/nyan index 6c33f0e..91b5af5 100755 --- a/nyan +++ b/nyan @@ -2,10 +2,14 @@ optstring="o:" declare -i abort=0 -# TODO: Check for dependencies pv and stat. # TODO: Add help option to display usage. # TODO: Consider a switch for per-file progress bars rather than a whole-operation one. +if [ ! -e "$(which pv)" ]; then + echo "Error: pv does not seem to be installed. Exiting." + exit 1 +fi + while getopts ${optstring} args; do case $args in o) output_file=${OPTARG} ;;