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 Nov 19, 2016
1 parent f46283b commit 5ef599f
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 5ef599f

Please sign in to comment.