[rock-linux] Submitting patches to submaster without sm.pl

ROCK Mailing List Archives

Attachments
Entire message
+ (text/plain)
+ (application/pgp-signature)
Author: 
Date:   
To: 
Subject: [rock-linux] Submitting patches to submaster without sm.pl
Hi *.

If you don't use the sm.pl client but want to submit patches to
Submaster you can put the following into your ~/.profile:

rock_commit_patch(){
        user=USERNAME
        pass=PASSWORD

        curl=`which curl`
        if [ -z "$curl" ] ; then
                echo "Could not find curl!"
                exit 1
        fi
        for x in "$@" ; do
                [ ! -f $x ] && continue
                curl -k -F u=$user -F p=$pass -F a=new -F q=1 -F f=@"$x" https://rocklinux.net/submaster/smadm.cgi
        done
}

and then just use
$ rock_commit_patch foo.patch
to submit a patch.

If you prefer not to write your password in plaintext there you can use

rock_commit_patch(){
        user=USERNAME
        read -p "Submaster Password: " -s pass
        echo

        curl=`which curl`
        if [ -z "$curl" ] ; then
                echo "Could not find curl!"
                exit 1
        fi
        for x in "$@" ; do
                [ ! -f $x ] && continue
                curl -k -F u=$user -F p=$pass -F a=new -F q=1 -F f=@"$x" https://rocklinux.net/submaster/smadm.cgi
        done
}


blindy

-- 
Benjamin 'blindCoder' Schieder
Registered Linux User #289529: https://counter.li.org

-- 
/lusr/bin/brain: received signal: SIGIDIOT