Skip to content

Instantly share code, notes, and snippets.

@PhilGeek
Created February 2, 2009 00:24

Revisions

  1. PhilGeek renamed this gist Feb 2, 2009. 1 changed file with 33 additions and 33 deletions.
    66 changes: 33 additions & 33 deletions snippet.html → installgawk.sh
    Original file line number Diff line number Diff line change
    @@ -1,34 +1,34 @@
    #!/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.
    #!/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
  2. PhilGeek created this gist Feb 2, 2009.
    34 changes: 34 additions & 0 deletions snippet.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    #!/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