dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 4f06dde310d25ffafc3e3a6b9198697bc30830fc
parent 3c03a46b85abdb8cfff14b3232c28b7274868599
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 27 Jan 2020 12:29:16 +0100

Use shorter remote directory names in upload script

Diffstat:
M.local/bin/upload | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.local/bin/upload b/.local/bin/upload @@ -6,7 +6,7 @@ version=1.0 # Upload target host="adamsgaard.dk" user="ad" -remotedir="/var/www/domains/adamsgaard.dk/files_nonpub" +remotedir="/var/www/domains/adamsgaard.dk/npub" show_help() { echo "usage: ${0##*/} [OPTIONS] FILE1 [FILE2...[FILE N]]" @@ -90,7 +90,7 @@ upload_file() { fi rsync -rz $progress --chmod=Fu=rw,Fog=r -e "ssh" "$infile" \ "${user}@${host}:${remotedir}/'$newbasename'" - url="https://$host/files_nonpub/${newbasename}" + url="https://$host/npub/${newbasename}" if [ "$verbose" = 1 ]; then echo msg="Uploaded to $url (copied to clipboard)" @@ -108,7 +108,7 @@ upload_file() { } download_file() { - url="https://$host/files_nonpub/$1" + url="https://$host/npub/$1" if command -v hurl >/dev/null 2>&1; then hurl "$url" > ./"$1" elif command -v curl >/dev/null 2>&1; then