Files
mpbb/chroot-scripts/installmacports
2011-07-30 12:14:02 +00:00

18 lines
402 B
Bash
Executable File

#!/bin/sh
#
# configure/build/install MacPorts in the chroot
#
if [[ -z "$PREFIX" ]]; then
PREFIX=/opt/local
fi
if [[ -z "$SRC_PREFIX" ]]; then
SRC_PREFIX=/opt/mports
fi
cd ${SRC_PREFIX}/base
./configure --prefix=${PREFIX} && make -j2 all && make install && make distclean
if [[ $? == 0 ]]; then
echo "file://${SRC_PREFIX}/dports [default,nosync]" > ${PREFIX}/etc/macports/sources.conf
fi