Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #61: Adds support for macports and archlinux #62

Merged
merged 1 commit into from
Nov 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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