diff options
author | Nils <git@velohero.com> | 2016-11-07 16:00:17 +0100 |
---|---|---|
committer | Nils <git@velohero.com> | 2016-11-07 16:00:17 +0100 |
commit | 6d974e69901814f8649393c090fc4bf8c186d5e8 (patch) | |
tree | 43003d3954d01dee904e24c7394399eee592f1a0 | |
parent | 1ae9e7673a85e5a50f8ad5560fb63815e741b445 (diff) |
possibility (-d) to customize the thumbdir added.
GitHub Pages don’t like directory names that start with an underscore
(_).
-rwxr-xr-x | gallery.sh | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 ;; |