summaryrefslogtreecommitdiff
path: root/publish
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2013-04-19 13:12:41 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2013-04-19 13:12:41 +0000
commita2d68563fd9f7dac29e0a7b47f9b94a83f43b2db (patch)
tree1187e2de005a113da8ec0a7d6c1d3ed06307bdcf /publish
parentd40cd999317a0e38fc9cc214070b9d26603fb851 (diff)
re-publish support
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@614 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'publish')
-rwxr-xr-xpublish8
1 files changed, 6 insertions, 2 deletions
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/"