[Debian-eeepc-devel] [SCM] custom debian-installer for EeePC branch, master, updated. f359508a97635a1ab51c6f72207c08bc77971661

Brendan M brendan at bbqsrc.net
Sat Mar 8 09:43:07 UTC 2008


The following commit has been merged in the master branch:
commit f359508a97635a1ab51c6f72207c08bc77971661
Author: Brendan M <brendan at bbqsrc.net>
Date:   Sat Mar 8 20:11:04 2008 +1100

    Version 0.4 - now runs with /bin/sh

diff --git a/build-eeepc.bash b/build-eeepc.sh
similarity index 75%
rename from build-eeepc.bash
rename to build-eeepc.sh
index 9d2cc07..09cf901 100755
--- a/build-eeepc.bash
+++ b/build-eeepc.sh
@@ -1,8 +1,8 @@
-#!/bin/bash -e
+#!/bin/sh -e
 #
 #######################################################################
 #
-# build-eeepc 0.3 - Builds an eeepc-specific monolithic debian installer.
+# build-eeepc 0.4 - Builds an eeepc-specific monolithic debian installer.
 # Copyright (C) 2008  Brendan M.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -37,7 +37,7 @@ if [ ! $USER == "root" ]; then
 fi
 
 # Functions!
-function eee_wheel {
+eee_wheel() {
 	case $PART in
 	"")
 		eee_initialisers; PART=1; eee_wheel;;
@@ -58,15 +58,17 @@ function eee_wheel {
 	esac
 }
 
-function eee_initialisers {
+eee_initialisers() {
     echo -e "\033[1;32;41m Initialising directories... \033[0m "
-    mkdir -p $BASEDIR/{kernel-wedge,tmp,iso,img,tmpdebs}
+    for dirs in kernel-wedge tmp iso img tmpdebs
+    	do mkdir -p "$BASEDIR"/${dirs}
+    done
     echo -e "\033[1;32;41m Initialised directories. \033[0m "
 }
 
-function eee_download {
+eee_download() {
     echo -e "\033[1;32;41m Beginning part 1... (downloading and installing parts) \033[0m "
-    cd $BASEDIR/tmpdebs
+    cd "$BASEDIR"/tmpdebs
     $SUDO apt-get -y update
     wget -c http://security.debian.org/debian-security/pool/updates/main/l/linux-2.6/linux-image-2.6.22-3-486_2.6.22-6.lenny1_i386.deb
     dpkg -L linux-image-2.6.22-3-486 || $SUDO dpkg -i linux-image-2.6.22-3-486_2.6.22-6.lenny1_i386.deb 
@@ -77,67 +79,67 @@ function eee_download {
     libbogl-dev glibc-pic libslang2-pic libnewt-pic genext2fs mklibs xslt-proc \
     mkisofs tofrodos bf-utf-source upx-ucl win32-loader dosfstools initramfs-tools module-init-tools
     wget -c $DEBMIRROR/debian/pool/main/l/linux-kernel-di-i386-2.6/linux-kernel-di-i386-2.6_1.57.tar.gz
-    cd $BASEDIR/kernel-wedge
-    tar xf $BASEDIR/tmpdebs/linux-kernel-di-i386-2.6_1.57.tar.gz
-    cd $BASEDIR
+    cd "$BASEDIR"/kernel-wedge
+    tar xf "$BASEDIR"/tmpdebs/linux-kernel-di-i386-2.6_1.57.tar.gz
+    cd "$BASEDIR"
     svn co svn://svn.debian.org/svn/d-i/trunk debian-installer 
     echo -e "\033[1;32;41m Part 1 complete. \033[0m "
 } 
 
-function eee_kernelwedge {
+eee_kernelwedge() {
     echo -e "\033[1;32;41m Beginning part 2... (kernel-wedge) \033[0m "
-    cd $BASEDIR/kernel-wedge/linux-kernel-di-i386-2.6
+    cd "$BASEDIR"/kernel-wedge/linux-kernel-di-i386-2.6
     echo atl2 >> ./modules/i386/nic-modules
     kernel-wedge build-all
-    cp -r ../*.udeb $BASEDIR/debian-installer/installer/build/localudebs/ 
+    cp -r ../*.udeb "$BASEDIR"/debian-installer/installer/build/localudebs/ 
     echo -e "\033[1;32;41m Part 2 complete. \033[0m "
 }
 
-function eee_di {
+eee_di() {
     echo -e "\033[1;32;41m Beginning part 3... (debian-installer) \033[0m "
-    cd $BASEDIR/debian-installer/installer/build
+    cd "$BASEDIR"/debian-installer/installer/build
     sed -ie 's/#monolithic/monolithic/g' ./config/i386.cfg
     sed -ie 's/DEBIAN_RELEASE = .*/DEBIAN_RELEASE = lenny/g' ./config/common
     fakeroot make build_monolithic
     echo -e "\033[1;32;41m Part 3 complete. \033[0m "
 }
 
-function eee_initrd {
+eee_initrd() {
     echo -e "\033[1;32;41m Beginning part 4... (initrd atl2 fun) \033[0m"
-    cd $BASEDIR/tmp
-    cp $BASEDIR/debian-installer/installer/build/dest/monolithic/initrd.gz $BASEDIR/tmp/
+    cd "$BASEDIR"/tmp
+    cp "$BASEDIR"/debian-installer/installer/build/dest/monolithic/initrd.gz "$BASEDIR"/tmp/
     gunzip initrd.gz
     cpio -i < initrd
     rm initrd
-    cd $BASEDIR/tmp/usr/lib/post-base-installer.d/
+    cd "$BASEDIR"/tmp/usr/lib/post-base-installer.d/
     wget http://bbqsrc.net/eeepc/debian/05atl2-install
     chmod +rx 05atl2-install
-    cd $BASEDIR/tmp
+    cd "$BASEDIR"/tmp
     find ./ | cpio -H newc -o > ./initrd
     gzip initrd
     echo -e "\033[1;32;41m Part 4 complete. \033[0m "
 }
 
-function eee_iso2img {
+eee_iso2img() {
     echo -e "\033[1;32;41m Beginning part 5... (iso to img) \033[0m "
     dd if=/dev/zero of=./$IMAGENAME bs=1k count=16000
     $SUDO mkfs.vfat ./$IMAGENAME
-    $SUDO mount -o loop ./$IMAGENAME $BASEDIR/img
-    $SUDO mount -o loop $BASEDIR/debian-installer/installer/build/dest/monolithic/mini.iso $BASEDIR/iso
-    $SUDO cp -r $BASEDIR/iso/* $BASEDIR/img/
-    $SUDO umount $BASEDIR/iso
-    $SUDO rm $BASEDIR/img/initrd.gz $BASEDIR/img/isolinux.bin
-    $SUDO mv ./initrd.gz $BASEDIR/img/
-    $SUDO mv $BASEDIR/img/isolinux.cfg $BASEDIR/img/syslinux.cfg 
-    $SUDO umount $BASEDIR/img 
+    $SUDO mount -o loop ./$IMAGENAME "$BASEDIR"/img
+    $SUDO mount -o loop "$BASEDIR"/debian-installer/installer/build/dest/monolithic/mini.iso "$BASEDIR"/iso
+    $SUDO cp -r "$BASEDIR"/iso/* "$BASEDIR"/img/
+    $SUDO umount "$BASEDIR"/iso
+    $SUDO rm "$BASEDIR"/img/initrd.gz "$BASEDIR"/img/isolinux.bin
+    $SUDO mv ./initrd.gz "$BASEDIR"/img/
+    $SUDO mv "$BASEDIR"/img/isolinux.cfg "$BASEDIR"/img/syslinux.cfg 
+    $SUDO umount "$BASEDIR"/img 
     $SUDO syslinux ./$IMAGENAME
-    $SUDO mv ./$IMAGENAME $BASEDIR/
+    $SUDO mv ./$IMAGENAME "$BASEDIR"/
     echo -e "\033[1;32;41m Part 5 complete. \033[0m"
 }
 
-function eee_cleantmp {
+eee_cleantmp() {
     echo -e "\033[1;32;41m Cleaning up tmp/... \033[0m "
-    rm -rf $BASEDIR/tmp/*
+    rm -rf "$BASEDIR"/tmp/*
     echo -e "\033[1;32;41m Cleaned. \033[0m "
 }
 
@@ -151,16 +153,20 @@ exit 1 #Just incase the wheel says no.
 #
 #   Changelog
 #
-#   01/03/2007 - 0.1
+#   01/03/2008 - 0.1
 #   - Initial release
 #   - Major process complete
 #
-#   01/03/2007 - 0.2
+#   01/03/2008 - 0.2
 #   - Multiple mistakes fixed
 #   - First working image created :)
 #
-#   02/03/2007 - 0.3
+#   02/03/2008 - 0.3
 #   - Basically rewritten to include functions and a wheel case
 #   - Can be run as root without sudo :)
 #
+#   08/03/2008 - 0.4
+#   - No longer requires bash!
+#   - $BASEDIR can now contain spaces without error
+#
 #######################################################################

-- 
custom debian-installer for EeePC



More information about the Debian-eeepc-devel mailing list