diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2008-11-14 20:38:26 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2008-11-14 20:38:26 +0000 |
commit | e77ddaf6db1621001634fb5602ea42a59cf0660c (patch) | |
tree | 8dee183745e0873ac328be1f40051cade5202e63 /tools | |
parent | 9fbc0c14005e2a70996a539dbad5f1ebd9f2fcd6 (diff) | |
download | monitoring-plugins-e77ddaf6db1621001634fb5602ea42a59cf0660c.tar.gz |
Helper script to upload tarballs to SF and create md5sum
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2081 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/sfupload | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/sfupload b/tools/sfupload new file mode 100755 index 00000000..8925fcb5 --- /dev/null +++ b/tools/sfupload @@ -0,0 +1,27 @@ +#!/bin/bash +# SYNTAX: +# sfupload {version} [username] +# Quick script to upload new nagiosplug tarball to SF +# Expects $1 = version number of tarball +# $2 to be username on SF, defaults to $USER +# Expects to be run from top level dir + +function die { echo $1; exit 1; } + +tarball="nagios-plugins-$1.tar.gz" + +if [[ ! -e $tarball ]]; then + die "No tarball found: $tarball"; +fi +md5sum $tarball > $tarball.md5sum + +user=${2:-$USER} +echo "Logging in as $user" +cat <<EOF | sftp $user@frs.sourceforge.net || die "Cannot upload to SF" +cd uploads +put $tarball +put $tarball.md5sum +EOF + +echo "Finished uploading files to SF" + |