scripts

various script and utils
git clone git://z3bra.org/scripts
Log | Files | Refs

commit 9f34ec58fe61f717d8c851f44f865268df0760c6
parent 2d2ac7ef4981855ed653e64eaec59173509bbe57
Author: z3bra <willy@mailoo.org>
Date:   Thu Feb  5 14:08:43 +0100

removed upload script

Diffstat:
upload | 43-------------------------------------------
1 file changed, 0 insertions(+), 43 deletions(-)
diff --git a/upload b/upload @@ -1,43 +0,0 @@ -#!/bin/bash - -host=gavroche -user=willy -port=22 -path=/srv/http/raw.z3bra.org -base=raw.z3bra.org - -file='' -tmpfile=/tmp/paste - -echo '' > $tmpfile - -if [[ $# -eq 0 ]]; then - while read line; do - echo ${line} >> $tmpfile - done - - file=$tmpfile -else - file=$@ -fi - -for f in $file; do - case $(file $f| grep -o -E 'text|image') in - text) - ext=plain - ;; - image) - ext=img - ;; - *) - ext=null - ;; - esac - - name=$(echo $f| sed 's@^.*/\([a-zA-Z0-9.]*\)$@\1@') - - url="http://${base}/${ext}/${name}" - scp $file ${host}:${path}/$ext/$name && echo $url -done - -[[ -f $tmpfile ]] && rm $tmpfile