3 # sfupload {version} [username]
4 # Quick script to upload new nagiosplug tarball to SF
5 # Expects $1 = version number of tarball
6 # $2 to be username on SF, defaults to $USER
7 # Expects to be run from top level dir
9 function die
{ echo $1; exit 1; }
11 tarball
="nagios-plugins-$1.tar.gz"
13 if [[ ! -e $tarball ]]; then
14 die
"No tarball found: $tarball";
16 md5sum $tarball > $tarball.
md5sum
19 echo "Logging in as $user"
20 cat <<EOF | sftp $user@frs.sourceforge.net || die "Cannot upload to SF"
26 echo "Finished uploading files to SF"