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 be74625004225689f2e608d35635fbc20a7fafa9
parent 38d372b05a79b3857695851b6a8b5559b56f34c0
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed,  2 Jan 2019 10:24:23 +0100

Fix several upload issues

Diffstat:
Mlinks/bin/upload | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/links/bin/upload b/links/bin/upload @@ -53,11 +53,11 @@ function add_resize { function upload_file { infile="$1" - original_basename="$2" - formatted_basename="${$original_basename// /_}" + basename="$2" + newbasename="${basename// /_}" rsync -rvz --progress --chmod=Fu=rw,Fog=r -e "ssh" "$infile" \ - "${user}@${host}:${remotedir}/$formatted_basename" - url="https://$host/files_nonpub/${formatted_basename}" + "${user}@${host}:${remotedir}/$newbasename" + url="https://$host/files_nonpub/${newbasename}" echo echo -e "$(tput setaf 2)Uploaded to $url (copied to clipboard)$(tput sgr0)" @@ -113,11 +113,11 @@ done # loop over FILE[S] for f in "$@"; do tempfile="$(mktemp)" - cp "$f" "$uploadfile" + cp "$f" "$tempfile" [ "$border" = 1 ] && add_border "$tempfile" [ "$resize" = 1 ] && add_resize "$tempfile" - [ "$sharpen" = 1 ] && add_sharpen "$tempfile" + [ "$sharpen" = 1 ] && add_sharpening "$tempfile" upload_file "$tempfile" "$(basename "$f")" done