mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-16 17:18:06 -05:00
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2081 f882894a-f735-0410-b71e-b25c423dba1c
27 lines
612 B
Bash
Executable file
27 lines
612 B
Bash
Executable file
#!/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"
|
||
|