From 6d974e69901814f8649393c090fc4bf8c186d5e8 Mon Sep 17 00:00:00 2001 From: Nils Date: Mon, 7 Nov 2016 16:00:17 +0100 Subject: possibility (-d) to customize the thumbdir added. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub Pages don’t like directory names that start with an underscore (_). --- gallery.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gallery.sh b/gallery.sh index da1dde7..48efc0e 100755 --- a/gallery.sh +++ b/gallery.sh @@ -44,8 +44,9 @@ datetime+=" UTC" function usage { returnCode="$1" - echo -e "Usage: $me [-t ] [-h]: + echo -e "Usage: $me [-t <title>] [-d <thumbdir>] [-h]: [-t <title>]\t sets the title (default: $title) + [-d <thumbdir>]\t sets the thumbdir (default: $thumbdir) [-h]\t\t displays help (this message)" exit "$returnCode" } @@ -69,11 +70,14 @@ function getFileSize(){ echo "$myfilesize" } -while getopts ":t:h" opt; do +while getopts ":t:d:h" opt; do case $opt in t) title="$OPTARG" ;; + d) + thumbdir="$OPTARG" + ;; h) usage 0 ;; -- cgit v1.2.3