diff options
Diffstat (limited to '.config/bash')
-rw-r--r-- | .config/bash/functions.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/.config/bash/functions.sh b/.config/bash/functions.sh index c3782b3..ae7329b 100644 --- a/.config/bash/functions.sh +++ b/.config/bash/functions.sh @@ -100,7 +100,11 @@ up() { if [[ -f $1 ]]; then local rand=`date +%s | md5sum | sed -n 's/^\(...\).*$/\1/p'` - local name="${rand}-`basename $1`" + local r="${rand}" + local s=`basename $1` + + local name="$r-$s" + # local name="${rand}-`basename $1`" scp -q $1 $server:"/home/benjamin/uploads/${name}" || exit local cmd="sudo chown lighttpd:lighttpd /home/benjamin/uploads/${name}" @@ -111,7 +115,7 @@ up() { [[ -n $(echo $types | grep " $ext ") ]] && \ local url="http://89.149.199.86/highlight/${name}" || \ - local url="http://89.149.199.86/filebase/files/${name}" + local url="http://89.149.199.86/files/$r/$s" echo -n $url | xclip -selection clipboard echo -n $url | xclip -selection primary |