#!/bin/sh # # MacOE - Open Embedded wrapper and installer for MacOS X 10.4 # # Author and maintainer: # H. N. Schaller (hns@computer.org) # Last update: 26 Feb 2007 # Tested on: MacOS X 10.4.8 # Licensed using the GPL # Please let me know if it does not work or if you find bugs # # automatically installs if needed: # MacPorts (/opt/local/bin/ports) # getopt gmake git-core py-psyco # svn (/usr/local/bin/svn) # OE (/Developer/OE.sparseimage and /Volumes/OE) # monotone # mokomakefile # # useage: oe # rm -rf moko - to rebuild everything # exit - to exit the environment # # create OE working disk (must be a case-sensitive disk!) [ -r /Developer/OE.sparseimage ] || ( echo creating /Developer/OE.sparseimage hdiutil create /Developer/OE.sparseimage -volname OE -fs 'Case-sensitive Journaled HFS+' -size 4g -layout NONE -stretch 8g ) hdiutil mount /Developer/OE.sparseimage >/dev/null cd /Volumes/OE # set environment export OMDIR=/Volumes/OE/moko export HOME=$OMDIR export PATH=$OMDIR/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:$PATH export BBPATH=$OMDIR/build:$OMDIR/openmoko/trunk/oe:$OMDIR/openembedded [ -x /opt/local/bin/port ] || ( echo loading and installing MacPorts # if we are paranoid, download sources and build from scratch curl http://svn.macosforge.org/repository/macports/downloads/DarwinPorts-1.3.1/DarwinPorts-1.3.1-10.4.dmg --output MacPorts.dmg hdiutil mount MacPorts.dmg >/dev/null (cd /; pax -r -v -z ) /dev/null rm -rf MacPorts.dmg ) /opt/local/bin/port upgrade wget getopt gmake git-core py-psyco # monotone # monotone from MacPorts appears to be quite old (0.26) and we need 0.32 [ -x /opt/local/bin/mtn ] || ( echo loading and installing monotone curl http://www.venge.net/monotone/downloads/mtn-0.32-osx-univ.bz2 --output monotone.bz2 bunzip2 monotone.bz2 chmod +x monotone mv monotone /opt/local/bin/mtn ) [ -x /usr/local/bin/svn ] || ( echo loading and installing SVN # if we are paranoid, download sources and build from scratch curl http://mbo.versionshelf.com/Subversion-1.4.3.pkg.zip --output Subversion.pkg.zip unzip Subversion.pkg.zip (cd /; pax -r -v -z )