#!/bin/ksh ################################################################################ # # Shell script to push (via curl - opposite of wget) explorer data # to Sun's secure https website (supportfiles.sun.com). # # Need file /usr/local/share/curl/curl-ca-bundle.crt for cetifcate. # Otherwise run curl with "--insecure" option. # # Script assumes you have explorer outputs already collected in the INPUT dir. # # Matt Baker - mbaker@computeranddata.com # Latest copy available at www.computeranddata.com/scripts # Version 1.0 12/12/2006 # ################################################################################ DEBUG=0 if (( DEBUG )) then set -x fi SRCDIR=/workspace/dumps INDIR=$SRCDIR/SUNWexplorer OUTPUT=$SRCDIR/SUNWexplorer/OutputOfRuns VERBOSE="-v" #VERBOSE="" (echo "";echo "Starting push"; date; echo ""; echo "") >> $OUTPUT for FILE in $(ls $INDIR/explor*) do echo $FILE curl $VERBOSE -T $FILE "https://supportfiles.sun.com/curl?file=${FILE}&root=explorer" done >> $OUTPUT (echo "";echo "Completed push"; date; echo ""; echo "") >> $OUTPUT ########################################################################### # # Following output from: https://supportfiles.sun.com/curl # # You must specify the filename to upload to: # # curl -T $1 https://supportfiles.sun.com/curl?file=$2&root=$3 # # where: # $1 is the local filename # $2 is the remote filename - no path # $3 is the remote directory - one of the following # * cores # * europe-cores/asouth/incoming # * europe-cores/ch/cores # * europe-cores/de/incoming # * europe-cores/fr/cores # * europe-cores/se/cores # * europe-cores/uk/incoming # * iplanetcores # * explorer # * explorer-amer # * explorer-apac # * explorer-emea # # NOTE: # The ampersand that designates the 'root' form value must be escaped # with the '' character in the curl command line. ###########################################################################