From a2d68563fd9f7dac29e0a7b47f9b94a83f43b2db Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 19 Apr 2013 13:12:41 +0000 Subject: re-publish support git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@614 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- publish | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'publish') diff --git a/publish b/publish index 0f6b790..4d4a4f6 100755 --- a/publish +++ b/publish @@ -81,6 +81,7 @@ OPTIONS: -r Add --relative option to rsync so that path names of the given files are preserved at the remote host. -t days time to live in days + -T tag directory name on the server (use this to re-publish under that name) -x Publish the contents of the xclipboard. EOF } @@ -121,7 +122,7 @@ make_qrcode=0 add_default_cs=0 relative="" -while getopts "rhnq8HSxs:t:" OPTION +while getopts "rhnq8HSxs:t:T:" OPTION do case $OPTION in h) @@ -161,6 +162,9 @@ do t) ttl="$OPTARG" ;; + T) + d_server="$OPTARG" + ;; *) usage >&2 exit 1 @@ -217,7 +221,7 @@ fi d_date=$(date +"$date_format") d_random=$(get_random) -d_server="$d_date$d_random" +d_server="${d_server:-$d_date$d_random}" d_server_http_base=$( echo -n "$d_server" | uri_encode ) base_uri="$base_http/$d_server_http_base/" -- cgit v1.2.3