From 303bf3540e4837d164e370a312ffb544108bee51 Mon Sep 17 00:00:00 2001 From: Francois Marier Date: Mon, 12 Jul 2010 15:26:10 +1200 Subject: [PATCH] Add dependency checking (git, gpg and lp-project-upload) Signed-off-by: Francois Marier --- release.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/release.sh b/release.sh index 8073d0d..5f4f577 100755 --- a/release.sh +++ b/release.sh @@ -18,6 +18,31 @@ fi # Check for git gpg lp-project-upload +if [ ! -x /usr/bin/gpg ] ; then + echo "You need to install gpg: apt-get install gnupg" + exit 1 +fi + +if [ ! -x /usr/bin/git ] ; then + echo "You need to install git: apt-get install git-core" + exit 1 +fi + +if [ ! -x /usr/bin/lp-project-upload ] ; then + echo "You need to install lp-project-upload: apt-get install ubuntu-dev-tools" + exit 1 +fi + +GIT_MAJOR=`git --version | cut -d' ' -f 3 | cut -d'.' -f 1` +GIT_MINOR=`git --version | cut -d' ' -f 3 | cut -d'.' -f 2` + +if [ $GIT_MAJOR -lt 1 ] || [ $GIT_MAJOR == 1 -a $GIT_MINOR -lt 6 ] ; then + echo "Your version of git is too old. Install git 1.6." + exit 1 +fi + +# Check all parameters + VERSION=$1 MAJOR=${VERSION%.*} -- GitLab