Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -e
#-------------------------------------------------------------------------------
# Default values
#-------------------------------------------------------------------------------
: ${AUTOCONF_VERSION:=$1}
echo "[INFO] Autoconf '$AUTOCONF_VERSION'"
: ${GCC_HOME:=}
#!/bin/bash -e
#-------------------------------------------------------------------------------
# Default values
#-------------------------------------------------------------------------------
: ${GIT_VERSION:=$1}
echo "[INFO] Git '$GIT_VERSION'"
: ${GCC_HOME:=}
#!/bin/bash -x
: ${MPC_VERSION:=$1}
: ${GMP_HOME:=}
: ${MPFR_HOME:=}
: ${DESTDIR:=$(pwd)}
: ${PREFIX:=${DESTDIR}/${MPC_VERSION}}
: ${WORKSPACE:=${PREFIX}/workspace}
: ${BUILDDIR:=${WORKSPACE}/build}
@doubleotoo
doubleotoo / install-mpfr.sh
Last active October 13, 2015 02:48
Quick and dirty script to automate the installation of MPFR
#!/bin/bash -x
#-------------------------------------------------------------------------------
# Set defaults
#-------------------------------------------------------------------------------
: ${MPFR_VERSION:=$1}
: ${GMP_HOME:=}
: ${DESTDIR:=$(pwd)}
: ${PREFIX:=${DESTDIR}/${MPFR_VERSION}}
: ${SRCDIR:=}
@doubleotoo
doubleotoo / install-gmp.sh
Last active October 13, 2015 02:48
Quick and dirty script to automate the installation of GMP
#!/bin/bash -x
#-------------------------------------------------------------------------------
# Set defaults
#-------------------------------------------------------------------------------
: ${GMP_VERSION:=$1}
: ${DESTDIR:=$(pwd)}
: ${PREFIX:=${DESTDIR}/${GMP_VERSION}}
: ${SRCDIR:=}
: ${WORKSPACE:=${PREFIX}/workspace}
@doubleotoo
doubleotoo / install-boost.sh
Last active October 6, 2022 03:45
Quick and dirty script to automate the installation of the Boost C++ libraries
#!/bin/bash -e
#
# Usage: ./install-boost <version: x.xx.x>
: ${PATH:=}
: ${LD_LIBRARY_PATH:=}
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <version: 1.39.0>"
exit 1
@doubleotoo
doubleotoo / install-hpctoolkit.sh
Created November 19, 2012 17:45
Quick and dirty script to automate the installation of HPCToolkit
#!/bin/bash
#
# Usage: [HPCTOOLKIT_HOME=/path/for/hpctoolkit/home] ./install-hpctoolkit.sh
#
# Environment Variables
#
# HPCTOOLKIT_HOME (Optional) To specify a location to build and
# install the HPCToolkit software.
# Default: $HOME/opt/hpctoolkit
@doubleotoo
doubleotoo / timeout.sh
Created November 16, 2012 18:24
Execute a shell command with a timeout
#!/bin/sh
# Execute a command with a timeout
# Author:
# http://www.pixelbeat.org/
# Notes:
# Note there is a timeout command packaged with coreutils since v7.0
# If the timeout occurs the exit status is 124.
# There is an asynchronous (and buggy) equivalent of this
@doubleotoo
doubleotoo / autotools-bootstrap-basic.sh
Created November 14, 2012 23:54
A basic script for project setup with the GNU autotools
#! /bin/bash
#
# Copied from http://code.google.com/p/autotools-bootstrap/source/browse/autotools-bootstrap-basic.sh
#
# This is the basic script for project setup with the GNU autotools.
# Visit:
# http://seth-g-kriticos.blogspot.com/2008/06/how-to-set-up-open-source-c-development.html
# to find out, what it does.
echo "Please enter the project name: "
@doubleotoo
doubleotoo / install-gcc.sh
Last active October 12, 2015 02:08
GCC installation script (with pre-installed prerequisites)
#!/bin/bash -e
#-------------------------------------------------------------------------------
# Default values
#-------------------------------------------------------------------------------
: ${GCC_VERSION:=$1}
: ${LANGUAGES:=c,c++,fortran}
: ${MPFR_HOME:=}
: ${GMP_HOME:=}
: ${MPC_HOME:=}