Scripts/gentree

From Organic Design wiki
  1. !/bin/sh

. config/options

if [ "$2" != boot ]; then

 mkdir -p $INSTALL/sbin
 mkdir -p $INSTALL/etc/init.d
 mkdir -p $INSTALL/codecs
 mkdir -p $INSTALL/firmwares
 mkdir -p $INSTALL/etc/ndiswrapper
 cp $CONFIG/init $INSTALL/sbin
 cp $CONFIG/file_ext $INSTALL/etc
 cp $CONFIG/list_ext $INSTALL/etc
 for P in $PACKAGES/*; do
   [ -f $P/arch ] && grep -vq $TARGET_ARCH $P/arch && continue
   [ -d $P/init.d ] && cp $P/init.d/* $INSTALL/etc/init.d/
 done
 $SCRIPTS/install linux modules $1
 $SCRIPTS/install alsa $1
 $SCRIPTS/install tvout $1
 $SCRIPTS/install pciutils $1
 [ "$SDL" = yes ] && $SCRIPTS/install SDL $1
 $SCRIPTS/install MPlayer $1
 $SCRIPTS/install installator $1
 $SCRIPTS/install i18n $1
 $SCRIPTS/install webgui $1
 $SCRIPTS/install sleeptimer $1
 $SCRIPTS/install theme $1
 $SCRIPTS/install powernowd $1
 [ "$LCD4LINUX" = yes ] && $SCRIPTS/install lcd4linux $1
 [ "$DEVTOOLS" = yes ] && $SCRIPTS/install strace $1
 [ "$NETWORK" = yes ] && $SCRIPTS/install network $1
 [ "$OLSR" = yes ] && $SCRIPTS/install olsrd $1
 [ "$DXR3" = yes ] && $SCRIPTS/install em8300 $1
 [ "$IVTV" = yes ] && $SCRIPTS/install ivtv $1
 [ "$PYTHON" = yes ] && $SCRIPTS/install Python $1
 [ "$FREEVO" = yes ] && $SCRIPTS/install freevo $1
 [ "$EMULATORS" = yes ] && $SCRIPTS/install emulators $1
 [ "$VIEW_IMG" = yes ] && $SCRIPTS/install fbi $1
 [ "$GDB" = yes ] && $SCRIPTS/install gdb $1
 [ "$EXTRACODECS" = yes ] && $SCRIPTS/install extra-codecs-nonfree $1
 [ "$EXTRAFIRMWARES" = yes ] && $SCRIPTS/install extra-firmwares-nonfree $1
 [ "$DIGIMATRIX" = yes ] && $SCRIPTS/install digitools $1
 [ "$DIRECTFB" = yes ] && $SCRIPTS/install DirectFB $1
 [ "$DEBUG" = yes ] && echo -n "" >$INSTALL/etc/debug
 VER=`ls $INSTALL/lib/modules`
 $BUILD/module-init-tool*/depmod -b $INSTALL -v $VER > /dev/null
 for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep`; do
   rm -f $i
 done
 if [ "$COMPRESSION_METHOD" = lzma ]; then
   tar cf - -C $INSTALL lib usr/bin usr/lib | lzma e $INSTALL/bin.tar.lzma -si -a2
 else
   tar cf $INSTALL/bin.tar -C $INSTALL lib usr/bin usr/lib
   gzip -9 $INSTALL/bin.tar
 fi
 rm -rf $INSTALL/lib $INSTALL/usr/bin $INSTALL/usr/lib
 echo "$GEEXBOX_VERSION" > $INSTALL/etc/version

fi

if [ "$2" = boot -o "$2" = full ]; then

 $SCRIPTS/install linux image $1
 $SCRIPTS/install initrd $1
 $SCRIPTS/install syslinux $1
 $SCRIPTS/install yaboot $1

fi