Skip to content

Commit

Permalink
Make install_xapian.sh runnable on mac OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-vdulac committed May 3, 2017
1 parent f67036e commit 01108fa
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions install_xapian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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..."
Expand Down

0 comments on commit 01108fa

Please sign in to comment.