#!/bin/bash user=USERNAME pass=PASSWORD if [ "${1}" == "-proxy" ] ; then proxy="-x ${2}" shift ; shift fi curl=`which curl` if [ -z "$curl" ] ; then echo "Could not find curl!" exit 1 fi for x in "$@" ; do [ ! -f "$x" ] && continue curl ${proxy} -k -b "smauth=${user}:${pass}" -F mode=new -F action=newpatch -F newpatch_file=@${x} "https://www.rocklinux.net/submaster/index.websplb" echo "Moving ${x} to /var/rock_patches for later archival" mkdir -p /var/rock_patches mv "${x}" /var/rock_patches done