scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

commit e9f2bfa22f43594235b8b963dc19cc19c9a23a73
parent e8aa1006b90a305390ff39bc48d0d94ad9c9ad1f
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Wed, 19 Oct 2022 17:23:28 +0200

Added random path to share url; made theme executable

Diffstat:
Mshare | 9+++++++--
Mtheme | 0
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/share b/share @@ -2,7 +2,12 @@ # One-liner to upload stuff to my webserver -url=tronto.net:/var/www/htdocs/share.tronto.net +srv=tronto.net +dir=$(cat /dev/random | tr -cd 'a-z0-9' | fold -w 8 | head -n 1) +htp=https://share.tronto.net/$dir +pth=/var/www/htdocs/share.tronto.net/$dir +url=$srv:$pth +ssh tronto.net mkdir $pth scp $@ $url/ -for i in $@; do echo "https://share.tronto.net/$i"; done +for i in $@; do echo "$htp/$i"; done diff --git a/theme b/theme