scripts

shell scripts
git clone git://git.bitsmanent.org/scripts
Log | Files | Refs | README

commit c9f9a896435ed10fdf92543b85d278b3348c8863
parent d5a7b3e91e125be067f9d9f2c04dc4f34582e756
Author: clamiax <smoppy@gmail.com>
Date:   Sun,  5 Jan 2014 21:01:44 +0000

Add -h flag (usage)

Diffstat:
Mscrapthumb | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/scrapthumb b/scrapthumb @@ -32,9 +32,20 @@ preload() { done } +usage() { +echo -n "Usage: $0 [-hns] +-s Source +-n Number of items +-h Show this helps +" + +exit 1 +} + main() { - while getopts "n:s:" opt; do + while getopts "hn:s:" opt; do case $opt in + h) usage;; n) MAXIMGS=$OPTARG;; s) SOURCES=($OPTARG);; esac