diff options
Diffstat (limited to 'publish')
-rwxr-xr-x | publish | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -77,6 +77,7 @@ OPTIONS: -q Produce a QR code. -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 -x Publish the contents of the xclipboard. EOF } @@ -117,7 +118,7 @@ make_qrcode=0 add_default_cs=0 relative="" -while getopts "rhnq8HSxs:" OPTION +while getopts "rhnq8HSxs:t:" OPTION do case $OPTION in h) @@ -154,6 +155,9 @@ do r) relative="--relative" ;; + t) + ttl="$OPTARG" + ;; *) usage >&2 exit 1 @@ -250,6 +254,12 @@ if command -v xclip >/dev/null 2>&1; then fi +if [ -n "${ttl}" ]; then + echo "${ttl}" >> $tmpdir/.publish.ttl + set dummy "$tmpdir/.publish.ttl" "$@" + shift +fi + while [ "$#" -gt 0 ]; do file="$1" shift |