#!/bin/sh set -o errexit # inc::Module::Install is required for this script to work. It will fail # on 'perl Makefile.PL' if this module is not installed. # The secret key for the module signer must be present on the box where # this script is run. usage() { errorMsg=$1 echo "Usage: `basename $0` " echo " where is like 'Email-AutoReply'" if [ -n "$errorMsg" ] then echo echo ">>> $errorMsg" exit 1 fi exit 0 } [ "$1" == "--help" ] && usage [ "$1" == "--version" ] && usage '$Revision: 1.4 $' [ $# -eq 0 ] && usage "No arguments given" distdir=$1 echo "DISTDIR is $distdir" [ -d $distdir ] || usage "first argument is not a directory" date=`date -I` tmpdir=`mktemp -d /tmp/perlTarDist_${date}__XXXXXX` echo Created temporary directory $tmpdir ... distdirNoslash=`echo $distdir | sed -e 's#/$###'` echo Copying $distdirNoslash to $tmpdir ... rsync --archive --cvs-exclude $distdirNoslash $tmpdir buildroot=$tmpdir/$distdirNoslash cd $buildroot echo Building Makefile ... perl Makefile.PL echo Building MANIFEST ... make manifest echo Signing ... make distsign echo Building MANIFEST ... make manifest echo Signing ... make distsign echo Creating tarball ... make dist echo DONE. Look for .tar.gz in $buildroot