Sha256: c7943907127b0b652bf529456995c89ac5913341c61f6926d42c7d8c8dcc757e

Contents?: true

Size: 1.97 KB

Versions: 5

Compression:

Stored size: 1.97 KB

Contents

#!/usr/bin/env bash

version=$1
engine=$2

set -e

load_sphinx () {
  distro="xenial"

  case $version in
    2.1.9)
      url="http://sphinxsearch.com/files/sphinxsearch_2.1.9-release-0ubuntu11~trusty_amd64.deb"
      format="deb"
      distro="trusty";;
    2.2.11)
      url="http://sphinxsearch.com/files/sphinxsearch_2.2.11-release-1~xenial_amd64.deb"
      format="deb";;
    3.0.3)
      url="http://sphinxsearch.com/files/sphinx-3.0.3-facc3fb-linux-amd64.tar.gz"
      format="gz";;
    3.1.1)
      url="http://sphinxsearch.com/files/sphinx-3.1.1-612d99f-linux-amd64.tar.gz"
      format="gz";;
    *)
      echo "No Sphinx version $version available"
      exit 1;;
  esac

  if [ "$distro" == "trusty" ]; then
    curl --location http://launchpadlibrarian.net/247512886/libmysqlclient18_5.6.28-1ubuntu3_amd64.deb -o libmysql.deb
    sudo apt-get install ./libmysql.deb
  fi

  if [ "$format" == "deb" ]; then
    curl --location $url -o sphinx.deb
    sudo apt-get install ./sphinx.deb
  else
    curl $url -o sphinx.tar.gz
    tar -zxvf sphinx.tar.gz
    sudo mv sphinx-$version/bin/* /usr/local/bin/.
  fi
}

load_manticore () {
  url="https://github.com/manticoresoftware/manticore/releases/download/$version/manticore_$version.deb"

  case $version in
    2.6.4)
      url="https://github.com/manticoresoftware/manticoresearch/releases/download/2.6.4/manticore_2.6.4-180503-37308c3-release-stemmer.xenial_amd64-bin.deb";;
    2.7.5)
      url="https://github.com/manticoresoftware/manticoresearch/releases/download/2.7.5/manticore_2.7.5-181204-4a31c54-release-stemmer.xenial_amd64-bin.deb";;
    2.8.2)
      url="https://github.com/manticoresoftware/manticoresearch/releases/download/2.8.2/manticore_2.8.2-190402-4e81114-release-stemmer.xenial_amd64-bin.deb";;
    *)
      echo "No Manticore version $version available"
      exit 1;;
  esac

  curl --location $url -o manticore.deb
  sudo apt-get install ./manticore.deb
}

if [ "$engine" == "sphinx" ]; then
  load_sphinx
else
  load_manticore
fi

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
riddle-2.4.2 bin/loadsphinx
riddle-2.4.1 bin/loadsphinx
thinking-sphinx-4.4.1 bin/loadsphinx
thinking-sphinx-4.4.0 bin/loadsphinx
riddle-2.4.0 bin/loadsphinx