Created
February 2, 2009 00:24
-
-
Save PhilGeek/56708 to your computer and use it in GitHub Desktop.
Install GNU awk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# installgawk.sh | |
# | |
# A bash script to install the latest version of GNU awk. Be sure to set the variables to the desired values. | |
# | |
# http://www.gnu.org/software/gawk/ | |
# | |
# Mark Eli Kalderon 2008-03-22 | |
# Gawk. Change to the desired version if necessary | |
VER="3.1.6" | |
GAWK="gawk-${VER}" | |
# Build directories. Change to the desired directories if necessary. | |
GBLDDIR=/var/tmp/${GAWK}-build | |
# Create gawk build directory, but save source files if they exist. | |
test -d ${GBLDDIR} || mkdir ${GBLDDIR} | |
test -d ${GBLDDIR}/${GAWK} && /bin/rm -rf ${GBLDDIR}/${GAWK} | |
cd $GBLDDIR | |
# Download and unpack gawk source. | |
curl http://ftp.gnu.org/gnu/gawk/${GAWK}.tar.gz -O | |
tar -xvzf ${GAWK}.tar.gz | |
cd ${GAWK} | |
# Configure and build gawk. | |
./configure | |
make | |
make check | |
# Install gawk (in /usr/local/bin/). Will prompt for password. | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment