#!/bin/bash # prepare RPM a DEB packages using # Effing Package Manager ( see https://github.com/jordansissel/fpm ) set -ex TARGET_DIR=/opt/nagios-plugins PACKAGE_NAME=snmp-tortilla TMPDIR=`mktemp -d /tmp/tmp.fpm.XXXXXXXXXX` RELEASE=`date +%Y%m%d` EPOCH=$[ $(date +%s ) - 1363388400 ] mkdir ${TMPDIR}/bin mkdir ${TMPDIR}/ini mkdir ${TMPDIR}/cfg cp -r src/check_snmp_tortilla ${TMPDIR}/bin/check_snmp_tortilla cp -r ini/*.ini ${TMPDIR}/ini for fname in ini/*.ini; do base=$( basename $fname .ini ) cat > $TMPDIR/cfg/check-${base}.cfg <