tremoved upload script - scripts - various script and utils
 (HTM) git clone git://z3bra.org/scripts
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 9f34ec58fe61f717d8c851f44f865268df0760c6
 (DIR) parent 2d2ac7ef4981855ed653e64eaec59173509bbe57
 (HTM) Author: z3bra <willy@mailoo.org>
       Date:   Thu,  5 Feb 2015 14:08:43 +0100
       
       removed upload script
       
       Diffstat:
         D upload                              |      43 ------------------------------
       
       1 file changed, 0 insertions(+), 43 deletions(-)
       ---
 (DIR) diff --git a/upload b/upload
       t@@ -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