From 07b25711d3e7cd95f2acc4f63d013bf814d95f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Tue, 7 Mar 2023 17:33:17 +0100 Subject: etc --- root/.profile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'root/.profile') diff --git a/root/.profile b/root/.profile index 590eeee..de001c8 100644 --- a/root/.profile +++ b/root/.profile @@ -5,7 +5,9 @@ HISTFILESIZE=1000000000 shopt -s checkwinsize function upload () { chmod 0644 "$1" - sftp -b- upload@upload <<< "put '$1' www/`[ '$2'x = x ] && echo $1 || echo $2`" + d=`[ '$2'x = x ] && echo $1 || echo $2` + sftp -b- upload@upload <<< "put '$1' www/$d" + echo https://upload.sijanec.eu./$d | xclip } function mcd () { mkdir -p $@ && cd $@ -- cgit v1.2.3