From 2247b23d3cb6322ce477d45f84d52da47a940348 Mon Sep 17 00:00:00 2001 From: Kurt Neufeld Date: Sat, 4 Nov 2017 14:39:48 -0600 Subject: [PATCH] user friendly modifications to install_xapian.sh... check if user supplied version on command line and exit with message if they didn't --- install_xapian.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install_xapian.sh b/install_xapian.sh index 0aee0cd..548935a 100755 --- a/install_xapian.sh +++ b/install_xapian.sh @@ -1,9 +1,15 @@ #!/usr/bin/env bash # first argument of the script is Xapian version (e.g. 1.2.19) + VERSION=$1 +if [ -z "$VERSION" ]; then + echo "usage: $0 version_number" 1>&2 + exit 1 +fi + # prepare -mkdir $VIRTUAL_ENV/packages && cd $VIRTUAL_ENV/packages +mkdir -p $VIRTUAL_ENV/packages && cd $VIRTUAL_ENV/packages CORE=xapian-core-$VERSION BINDINGS=xapian-bindings-$VERSION