12345678910111213141516171819202122232425262728293031323334 |
- #! /bin/sh
- TEMPROOT=${1:-/usr/local/storage/dest/temproot/`uname -m`}
- # Check for the temproot
- if [ ! -d "${TEMPROOT}" ]; then
- echo "Temproot ${TEMPROOT} missing"
- exit 1
- fi
- cd "${TEMPROOT}"
- if [ -e /etc/mk.conf ]; then
- XSRCDIR=${XSRCDIR:-`make -f /etc/mk.conf -V XSRCDIR`}
- fi
- SRCDIR=/usr/src # TODO: Ask /etc/mk.conf about this too
- XSRCDIR=${XSRCDIR:=/usr/xenocara}
- for DIR in ${SRCDIR} ${XSRCDIR} ; do
- if [ ! -d "${DIR}" ]; then
- echo "Ignoring directory ${DIR}"
- else
- cd "${DIR}" || exit 1
- if [ X"${DIR}" = X"${XSRCDIR}" ]; then
- env DESTDIR="${TEMPROOT}" sudo -E make bootstrap \
- || exit 1
- fi
- if [ X"${DIR}" = X"${SRCDIR}" ]; then
- ( cd etc/ && \
- env DESTDIR="${TEMPROOT}" sudo -E make distribution )
- fi
- env DESTDIR="${TEMPROOT}" sudo -E make install || exit 1
- fi
- done
|