#!/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 -F "u=$user" -F "p=$pass" -F a=new -F q=1 -F f=@"$x" https://www.rocklinux.net/submaster/smadm.cgi echo "Moving ${x} to /var/rock_patches for later archival" mkdir -p /var/rock_patches mv "${x}" /var/rock_patches done