diff options
| author | Tony Garnock-Jones <tonyg@lshift.net> | 2008-07-03 13:35:11 +0100 |
|---|---|---|
| committer | Tony Garnock-Jones <tonyg@lshift.net> | 2008-07-03 13:35:11 +0100 |
| commit | 675869a27714307bce377638dfe8f6a5f069e757 (patch) | |
| tree | e4f9872242be02145702775f5c563f2b246f57ce /packaging/checks.sh | |
| download | rabbitmq-server-git-675869a27714307bce377638dfe8f6a5f069e757.tar.gz | |
Initial commit, from repo-rebase-20080703121916_default (e96543d904a2)
Diffstat (limited to 'packaging/checks.sh')
| -rwxr-xr-x | packaging/checks.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/packaging/checks.sh b/packaging/checks.sh new file mode 100755 index 0000000000..63e88701f3 --- /dev/null +++ b/packaging/checks.sh @@ -0,0 +1,45 @@ +#! /bin/sh + +# We check for the presence of the tools necessary to build a release on a +# Debian based OS. + +TOOLS_STOP=0 + +checker () { + if [ ! `which $1` ] + then + echo "$1 is missing, please install it" + TOOLS_STOP=1 + NEW_NAME=`echo $1 | sed -e 's/-/_/g'` + eval "$NEW_NAME=1" + else + echo "$1 found" + fi +}; + +echo ~~~~~~~~~~~~ Looking for mandatory programs ~~~~~~~~~~~~ + +for i in cdbs-edit-patch reprepro rpm elinks wget zip gpg rsync +do + checker $i +done +echo ~~~~~~~~~~~~~~~~~~~~~~~~~~ DONE ~~~~~~~~~~~~~~~~~~~~~~~ + +if [ 1 = $TOOLS_STOP ] +then + [ $cdbs_edit_patch ] && cdbs_edit_patch="cdbs " + [ $reprepro ] && reprepro="reprepro " + [ $rpm ] && rpm="rpm " + [ $elinks ] && elinks="elinks " + [ $wget ] && wget="wget " + [ $zip ] && zip="zip " + [ $gpg ] && gpg="gpg " + [ $rsync ] && rsync="rsync " + + echo + echo We suggest you run the command + echo "apt-get install ${cdbs_edit_patch}${reprepro}${rpm}${elinks}${wget}${zip}${gpg}${rsync}" + echo +fi + +exit $TOOLS_STOP |
