From 5ef599f1485bc9ff97ae719fe3a009979be0f635 Mon Sep 17 00:00:00 2001 From: "Charles V. Dulac" Date: Sat, 19 Nov 2016 15:30:07 +0900 Subject: [PATCH] Make install_xapian.sh runnable on mac OS X --- install_xapian.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/install_xapian.sh b/install_xapian.sh index 0aee0cd..b355171 100755 --- a/install_xapian.sh +++ b/install_xapian.sh @@ -3,7 +3,7 @@ VERSION=$1 # 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 @@ -15,8 +15,19 @@ curl -O https://oligarchy.co.uk/xapian/$VERSION/${BINDINGS}.tar.xz # extract echo "Extracting source..." -tar xf ${CORE}.tar.xz -tar xf ${BINDINGS}.tar.xz +if [ $OSTYPE = 'darwin*' ]; then + xz -d ${CORE}.tar.xz + xz -d ${BINDINGS}.tar.xz + + tar xf ${CORE}.tar + tar xf ${BINDINGS}.tar +else + tar xf ${CORE}.tar.xz + tar xf ${BINDINGS}.tar.xz +fi + +test -e $VIRTUAL_ENV/packages/${BINDINGS} || exit 1 +test -e $VIRTUAL_ENV/packages/${CORE} || exit 1 # install echo "Installing Xapian-core..."