From c931f58cc518260bd0f9e89a898d950db59a41cd Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 1 Jul 2014 08:50:51 +0000 Subject: Alexander Huemer: allow sourcing an extra config file via a cmdline option git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@676 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- publish | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'publish') diff --git a/publish b/publish index 67f5353..059ca0a 100755 --- a/publish +++ b/publish @@ -72,6 +72,7 @@ copy the file to a server and report the URL. OPTIONS: -8 Add a AddDefaultCharset UTF-8 .htaccess file. + -c CF Use config file CF. -H Show the history. -s FN When reading data from stdin, use FN as filename to be published. -S Make a screenshot of one window and publish. @@ -130,7 +131,7 @@ relative="" d_server="" unpublish=0 -while getopts "rRhnq8HSxs:t:T:u" OPTION +while getopts "rRhnq8HSxc:s:t:T:u" OPTION do case $OPTION in h) @@ -161,6 +162,14 @@ do S) do_screenshot=1 ;; + c) + if [ -f "$OPTARG" ]; then + . "$OPTARG" + else + echo "config file '$OPTARG' does not exist or is not a file" + exit 3 + fi + ;; s) name_stdin="$OPTARG" ;; -- cgit v1.2.3