tChanged the upload place - scripts - various script and utils
 (HTM) git clone git://z3bra.org/scripts
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 42391ae5b9ffde68dc22302a72a3c455cc189cd2
 (DIR) parent c4424e2cb4057a3180d61517d39bfddda1f846e6
 (HTM) Author: Willy Goiffon <w.goiffon@gmail.com>
       Date:   Tue,  3 Sep 2013 16:38:56 +0200
       
       Changed the upload place
       
       Diffstat:
         M upload                              |      18 +++++++++---------
       
       1 file changed, 9 insertions(+), 9 deletions(-)
       ---
 (DIR) diff --git a/upload b/upload
       t@@ -1,15 +1,15 @@
        #!/usr/bin/bash
        
       -host=ssh.blinkenshell.org
       -user=z3bra
       -port=443
       -path=public_html
       -base=z3bra.blinkenshell.org
       +host=gavroche
       +user=willy
       +port=22
       +path=/srv/http/raw
       +base=raw.z3bra.org
        
        file=''
        tmpfile=/tmp/paste
        
       -clear > $tmpfile
       +echo '' > $tmpfile
        
        if [[ $# -eq 0 ]]; then
            while read line; do
       t@@ -24,20 +24,20 @@ fi
        for f in $file; do
            case $(file $f| grep -o -E 'text|image') in
                text)
       -            ext=txt
       +            ext=plain
                    ;;
                image)
                    ext=img
                    ;;
                *)
       -            ext=rand
       +            ext=null
                    ;;
            esac
        
            name=$(echo $f| sed 's@^.*/\([a-zA-Z0-9.]*\)$@\1@')
        
            url="http://${base}/${ext}/${name}"
       -    scp -P ${port} $f ${user}@${host}:${path}/$ext/$name && echo $url
       +    scp ${host}:${path}/$ext/$name && echo $url
        done
        
        [[ -f $tmpfile ]] && rm $tmpfile