Skip to content

Instantly share code, notes, and snippets.

@fdr
Created January 9, 2013 01:19
Show Gist options
  • Save fdr/4489761 to your computer and use it in GitHub Desktop.
Save fdr/4489761 to your computer and use it in GitHub Desktop.
hammer version of flex-bison-builder
#!/bin/bash
set -uex
install_cwd() {
./configure --prefix=/app/vendor
make -sj4
make -sj4 install
}
FLEX_DIRNAME=flex-2.5.37
FLEX_ARCHIVE_NAME=$FLEX_DIRNAME.tar.bz2
echo 'Downloading and building GNU Flex'
curl -L http://prdownloads.sourceforge.net/flex/$FLEX_ARCHIVE_NAME?download > $FLEX_ARCHIVE_NAME
tar -jxf $FLEX_ARCHIVE_NAME
pushd $FLEX_DIRNAME
install_cwd
popd
echo 'Downloading and building GNU Bison'
BISON_DIRNAME=bison-2.6
BISON_ARCHIVE_NAME=$BISON_DIRNAME.tar.xz
curl -LO http://ftp.gnu.org/gnu/bison/$BISON_ARCHIVE_NAME
tar -Jxf $BISON_ARCHIVE_NAME
pushd $BISON_DIRNAME
install_cwd
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment