summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils <git@velohero.com>2016-11-07 16:00:17 +0100
committerNils <git@velohero.com>2016-11-07 16:00:17 +0100
commit6d974e69901814f8649393c090fc4bf8c186d5e8 (patch)
tree43003d3954d01dee904e24c7394399eee592f1a0
parent1ae9e7673a85e5a50f8ad5560fb63815e741b445 (diff)
possibility (-d) to customize the thumbdir added.
GitHub Pages don’t like directory names that start with an underscore (_).
-rwxr-xr-xgallery.sh8
1 files 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 <title>] [-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
;;