Skip to content

Commit

Permalink
Merge pull request #62 from puffybsd/issue-61
Browse files Browse the repository at this point in the history
Fixes #61: Adds support for macports and archlinux
  • Loading branch information
gjtorikian authored Nov 17, 2017
2 parents 11e1225 + e85b17f commit 20fb72b
Show file tree
Hide file tree
Showing 3 changed files with 620 additions and 607 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ To build mtex2MML, you need:
* [Flex](http://flex.sourceforge.net/)
* [Python3](https://www.python.org/) (just for the tests)

### OS X and Ubuntu
### OS X (brew or macports), Ubuntu and Arch Linux

To fetch dependencies, build, and run the library, call:

Expand Down
25 changes: 19 additions & 6 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,31 @@ echo "==> Installing required libraries…"

if [ "$(uname)" == "Darwin" ]; then
for pkg in flex bison cmake valgrind; do
if brew list -1 | grep -q "^${pkg}\$"; then
if hash port 2>/dev/null; then
if port installed $pkg | grep active | awk '{print $1};'; then
echo "Package '$pkg' is installed"
else
else
echo "Package '$pkg' is not installed"
brew install $pkg
port install $pkg
fi
else
if brew list -1 | grep -q "^${pkg}\$"; then
echo "Package '$pkg' is installed"
else
echo "Package '$pkg' is not installed"
brew install $pkg
fi
fi
done
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
if [ -z "$TRAVIS" ]; then
sudo apt-get -qq -y install flex bison cmake valgrind
if [ -f "/etc/arch-release" ]; then
sudo pacman --needed -S flex bison cmake valgrind
else
echo "Packages already installed on Travis CI."
if [ -z "$TRAVIS" ]; then
sudo apt-get -qq -y install flex bison cmake valgrind
else
echo "Packages already installed on Travis CI."
fi
fi
fi

Expand Down
Loading

0 comments on commit 20fb72b

Please sign in to comment.