effort: error on bad value to --above

This commit is contained in:
Nicolai Skogheim 2015-07-25 09:08:40 +02:00
parent 651a2bac97
commit 6ebfdc5329

View file

@ -140,6 +140,12 @@ do
esac
done
# Exit if above-value is not an int
if [ -z "${above##*[!0-9]*}" ] ; then
echo "error: argument to --above was not an integer" 1>&2
exit 1
fi
args_before_above=`printf " %q" "${@:1:$above_index}"`
num_args=$(( i - num_files ))