Page MenuHomeFreeBSD

bootstrap bmake
ActivePublic

Authored by bapt on Jun 6 2014, 3:47 PM.
#!/bin/sh
err() {
cd ${ORIGDIR}
rm -rf ${WRKDIR:-/nonexistent}
echo "$@" >&2
exit 1
}
: ${PORTSDIR:=/usr/ports}
: ${TMPDIR:=/tmp}
url=http://ftp.netbsd.org/pub/NetBSD/misc/sjg/bmake-20140214.tar.gz
makesum="2ec1771a800431c26361659ab0f96ec5c2536e85b46564eb69fa75a4b12886de"
WRKDIR=`mktemp -d ${TMPDIR}/bootstrap-ports-XXXX`
ORIGDIR=`pwd`
cd ${WRKDIR} || err "Impossible to create working directory"
fetch ${url} || err "Impossible to fetch bmake"
archive=${url##*/}
sum=$(sha256 -q ${archive})
[ "${sum}" == ${makesum} ] || err "Bad checksum"
tar xf ${archive} || err "Impossible to extract bmake"
cd ${WRKDIR}/bmake || err "Impossible to enter the bmake directory"
./configure || err "Fails to configure"
sh ./make-bootstrap.sh || err "Fails to bootstrap"
/${WRKDIR}/bmake/bmake -C ${PORTSDIR}/devel/bmake clean reinstall || err "Fails to bootstrap"
cd ${ORIGDIR}
rm -rf ${WRKDIR}

Event Timeline

bapt edited the content of this paste. (Show Details)Jun 6 2014, 3:47 PM
bapt changed the title of this paste from untitled to bootstrap bmake.
bapt updated the paste's language from autodetect to bash.
bapt changed the visibility from "All Users" to "Public (No Login Required)".
bapt edited the content of this paste. (Show Details)Jun 6 2014, 3:56 PM