sharefile

scripts for quickly sharing data to servers
git clone git://jb55.com/sharefile
Log | Files | Refs | README

commit dab9ac1b2c612c992f63d2bb9443d0cb9b83b48e
parent bbe9916aca5cf86b3e856c062e21e181d828650e
Author: William Casarin <bill@casarin.me>
Date:   Mon, 22 Feb 2016 16:44:29 -0800

tweak

Diffstat:
Ahashshare | 2++
Msharefile | 9++++-----
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/hashshare b/hashshare @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +sharefile -n "$(hashname "$1")" diff --git a/sharefile b/sharefile @@ -29,6 +29,9 @@ missing_env() { while getopts "h?n:u:d:" opt; do case "$opt" in + h|\?) + show_help + ;; n) name="$OPTARG" ;; @@ -38,8 +41,6 @@ while getopts "h?n:u:d:" opt; do u) SHAREFILE_URL="$OPTARG" ;; - h) - shouldHashName=1 esac done @@ -55,8 +56,6 @@ file="$1" name="${name:-"$(basename "$file")"}" dest="${SHAREFILE_HOST}\"${name}\"" -[[ $shouldHashName == 1 ]] && name="$(hashname "$file")" - rsync -zq --chmod=a=r "$file" "$dest" -echo "${SHAREFILE_URL}$(urlencode "$(basename "$name")")" +echo "${SHAREFILE_URL}$(urlencode "$(basename "${name}")")"