The first Fremantle easy-deb-chroot (0.9.33) that is somewhat working.
[easy-deb-chroot] / fremantle / easy-deb-chroot / src / home / user / img-install / debian-installer.sh
index bc9021b..c9135bd 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-## New! Ask where the user wishes to install the package with gxmessage:
+## Ask where the user wishes to install the package with gxmessage:
 
 export GXMSG=`printf "\
 Where do you want your Debian image file installed?\n\
@@ -28,8 +28,6 @@ echo "Downloading and extracting to $SDCARD..."
 export INSTPATH="/home/user/img-install"
 export TARPATH="$SDCARD"
 export DLURL="http://qole.org/files"
-export BZ2CMD1="bzip2 -d "
-export BZ2CMD2="$TARPATH"
 #This doesn't work:
 #export BZ2CMD1="bzcat"
 #export BZ2CMD2="| tar xf -"
@@ -38,6 +36,9 @@ export GZCMD1="tar -xzf"
 export EXTPATH1=$TARPATH
 export PKGNAME1="EASY DEBIAN IMAGE FILE"
 export BIGTAR1="debian-squeeze-m5-img.bz2"
+export BIGIMG1="debian-squeeze-m5.img.ext2"
+export BZ2CMD1="bzip2 -dc "
+export BZ2CMD2=" > $TARPATH/$BIGIMG1"
 export TARCMD1="$BZ2CMD1 $TARPATH/$BIGTAR1 $BZ2CMD2"
 export MD51="f769bb84c99f75821bdfa37e5ea34e86"
 export EXTCMD1=""
@@ -99,7 +100,14 @@ do
 
      cd $EXTPATH1
      echo Extracting the image file. This will take some time.
-     TARERR=`$TARCMD1 2>&1`
+
+     # Oh wow, this is even more of an ugly hack than my
+     # usual ugly hacks. So sorry you had to see this.
+
+     # TARERR=`$TARCMD1 2>&1`
+     TARERR="unspecified bzip2 error"
+     # echo $TARCMD1
+     $BZ2CMD1 $TARPATH/$BIGTAR1 > $TARPATH/$BIGIMG1
      if [ "$?" = 0 ] ; then
         rm -rf $TARPATH/$BIGTAR1
          $EXTCMD1