summaryrefslogtreecommitdiff
path: root/publish
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2014-07-01 08:50:51 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2014-07-01 08:50:51 +0000
commitc931f58cc518260bd0f9e89a898d950db59a41cd (patch)
tree4ab113de653ae94d190ca97d357e096d9895c999 /publish
parent4a5d0d4eccf50a32e6e198a064a624594836312f (diff)
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
Diffstat (limited to 'publish')
-rwxr-xr-xpublish11
1 files changed, 10 insertions, 1 deletions
diff --git a/publish b/publish
index 67f5353..059ca0a 100755
--- a/publish
+++ b/publish
@@ -72,6 +72,7 @@ copy the file <src> 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"
;;