summaryrefslogtreecommitdiff
path: root/publish
diff options
context:
space:
mode:
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"
;;