summaryrefslogtreecommitdiffstats
path: root/root/.bash_aliases
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-07-18 16:27:36 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-07-18 16:27:36 +0200
commitc557cf372caac47cfb0827f55b69781d31a1aaa4 (patch)
treedb5f7e26025044c8e031344e88da46b70f148e4c /root/.bash_aliases
parentc (diff)
parentb (diff)
downloadn-c557cf372caac47cfb0827f55b69781d31a1aaa4.tar
n-c557cf372caac47cfb0827f55b69781d31a1aaa4.tar.gz
n-c557cf372caac47cfb0827f55b69781d31a1aaa4.tar.bz2
n-c557cf372caac47cfb0827f55b69781d31a1aaa4.tar.lz
n-c557cf372caac47cfb0827f55b69781d31a1aaa4.tar.xz
n-c557cf372caac47cfb0827f55b69781d31a1aaa4.tar.zst
n-c557cf372caac47cfb0827f55b69781d31a1aaa4.zip
Diffstat (limited to 'root/.bash_aliases')
-rw-r--r--root/.bash_aliases1
1 files changed, 1 insertions, 0 deletions
diff --git a/root/.bash_aliases b/root/.bash_aliases
index abff120..cdef3c5 100644
--- a/root/.bash_aliases
+++ b/root/.bash_aliases
@@ -26,6 +26,7 @@ function upload () {
# chmod 0644 "$1"
d=`[ '$2'x = x ] && echo $1 || echo $2`
sftp -b- upload@upload.sijanec.eu <<< "put '$1' www/$d"
+ grep '/$' <<<$d && d=$d`rev <<<$1 | cut -d/ -f1 | rev`
ssh upload@upload.sijanec.eu chmod 0644 "www/$d"
echo https://upload.sijanec.eu./$d | xclip
}