tazlito rev 148
Tiny edits (and merge?)
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Sun Jan 24 19:16:52 2010 +0000 (2010-01-24) |
parents | 9813d9ffc480 |
children | 5e7f3f9bf5d7 |
files | tazlito tazlitobox |
line diff
1.1 --- a/tazlito Sun Jan 24 19:44:46 2010 +0100 1.2 +++ b/tazlito Sun Jan 24 19:16:52 2010 +0000 1.3 @@ -311,7 +311,7 @@ 1.4 { 1.5 ( cd $1 ; find . -print | cpio -o -H newc ) | \ 1.6 if [ "$COMPRESSION" = "none" ]; then 1.7 - echo "Generating uncompressed initramfs... " 1.8 + echo -n "Generating uncompressed initramfs... " 1.9 cat > $2 1.10 elif [ -x /usr/bin/lzma -a "$COMPRESSION" != "gzip" ]; then 1.11 echo -n "Generating lzma'ed initramfs... " 1.12 @@ -320,23 +320,6 @@ 1.13 echo -n "Generating gziped initramfs... " 1.14 gzip -9 > $2 1.15 fi 1.16 - echo 1 > /tmp/rootfs 1.17 -} 1.18 - 1.19 -# Compression functions for writeiso. 1.20 -write_initramfs() 1.21 -{ 1.22 - if [ "$COMPRESSION" = "lzma" ]; then 1.23 - echo -n "Creating rootfs.gz with lzma compression... " 1.24 - cat /tmp/list | cpio -o -H newc | lzma e -si -so > /rootfs.gz 1.25 - elif [ "$COMPRESSION" = "gzip" ]; then 1.26 - echo "Creating rootfs.gz with gzip compression... " 1.27 - cat /tmp/list | cpio -o -H newc | gzip -9 > /rootfs.gz 1.28 - else 1.29 - echo "Creating rootfs.gz without compression... " 1.30 - cat /tmp/list | cpio -o -H newc > /rootfs.gz 1.31 - fi 1.32 - echo 1 > /tmp/rootfs 1.33 } 1.34 1.35 # Generate a new initramfs from the root filesystem. 1.36 @@ -366,21 +349,32 @@ 1.37 echo "$save bytes saved in duplicate files." 1.38 ) 1.39 1.40 - # Use lzma if installed. Display rootfs size in realtime. 1.41 - rm -f /tmp/rootfs 1.42 - pack_rootfs . $DISTRO/$(basename $1).gz & 1.43 - sleep 2 1.44 - echo -en "\nFilesystem size:" 1.45 - while [ ! -f /tmp/rootfs ] 1.46 - do 1.47 - sleep 1 1.48 - echo -en "\\033[18G`du -sh $DISTRO/rootfs.gz | awk '{print $1}'` " 1.49 - done 1.50 - echo -e "\n" 1.51 + # Use lzma if installed 1.52 + pack_rootfs . $DISTRO/$(basename $1).gz 1.53 cd $DISTRO 1.54 mv $(basename $1).gz $ROOTCD/boot 1.55 } 1.56 1.57 +# Compression functions for writeiso. 1.58 +write_lzma_initramfs() 1.59 +{ 1.60 + echo -n "Creating rootfs.gz with lzma compression... " 1.61 + cat /tmp/list | cpio -o -H newc | lzma e -si -so > /rootfs.gz 1.62 + echo 1 > /tmp/rootfs 1.63 +} 1.64 +write_gzip_initramfs() 1.65 +{ 1.66 + echo "Creating rootfs.gz with gzip compression... " 1.67 + cat /tmp/list | cpio -o -H newc | gzip -9 > /rootfs.gz 1.68 + echo 1 > /tmp/rootfs 1.69 +} 1.70 +write_initramfs() 1.71 +{ 1.72 + echo "Creating rootfs.gz without compression... " 1.73 + cat /tmp/list | cpio -o -H newc > /rootfs.gz 1.74 + echo 1 > /tmp/rootfs 1.75 +} 1.76 + 1.77 distro_sizes() 1.78 { 1.79 echo "Build date : `date +%Y%m%d\ \at\ \%H:%M:%S`" 1.80 @@ -1136,6 +1130,7 @@ 1.81 mkdir -p "$ADDFILES/$i" 1.82 zcat $TMP_DIR/$FLAVOR.$i | \ 1.83 ( cd "$ADDFILES/$i"; cpio -id 2> /dev/null) 1.84 + status 1.85 fi 1.86 done 1.87 if [ -s $TMP_DIR/$FLAVOR.mirrors ]; then 1.88 @@ -1525,20 +1520,20 @@ 1.89 rm -rf /home/slitaz/distro 1.90 1.91 # Optionally remove sound card selection and screen resolution. 1.92 - echo "Do you wish to remove the sound card and screen config ? " 1.93 - echo -n "Press ENTER to keep or anser (No|yes|exit): " 1.94 + echo "Do you wish to remove the sound card and screen configs ? " 1.95 + echo -n "Press ENTER to keep or answer (No|yes|exit): " 1.96 read anser 1.97 case $anser in 1.98 e|E|"exit"|Exit) 1.99 exit 0 ;; 1.100 y|Y|yes|Yes) 1.101 - echo -n "Removing current sound card and screen configuration..." 1.102 + echo -n "Removing current sound card and screen configurations..." 1.103 rm -f /var/lib/sound-card-driver 1.104 rm -f /etc/asound.state 1.105 rm -f /etc/X11/screen.conf 1.106 rm -f /etc/X11/xorg.conf ;; 1.107 *) 1.108 - echo -n "Keeping current sound card and screen configuration..." ;; 1.109 + echo -n "Keeping current sound card and screen configurations..." ;; 1.110 esac 1.111 status 1.112 1.113 @@ -1550,11 +1545,17 @@ 1.114 do 1.115 echo $dir >>/tmp/list 1.116 done 1.117 + rm -f /tmp/rootfs 1.118 1.119 - # Generate initramfs with specified compression and display rootf 1.120 + # Generate initramfs with specified compression and display rootfs 1.121 # size in realtime. 1.122 - rm -f /tmp/rootfs 1.123 - write_initramfs & 1.124 + if [ "$COMPRESSION" = "lzma" ]; then 1.125 + write_lzma_initramfs & 1.126 + elif [ "$COMPRESSION" = "gzip" ]; then 1.127 + write_gzip_initramfs & 1.128 + else 1.129 + write_initramfs & 1.130 + fi 1.131 sleep 2 1.132 echo -en "\nFilesystem size:" 1.133 while [ ! -f /tmp/rootfs ] 1.134 @@ -1576,8 +1577,9 @@ 1.135 else 1.136 echo -e " 1.137 Unable to mount the cdrom to copy the Kernel and needed files. When SliTaz 1.138 -is running in RAM the kernel and bootloader files are keeped on the cdrom. 1.139 -Please insert a LiveCD or unmount curent cdrom to let Tazlito handle the media.\n" 1.140 +is running in RAM the kernel and bootloader files are kept on the cdrom. 1.141 +Please insert a LiveCD or unmount the current cdrom to let Tazlito handle 1.142 +the media.\n" 1.143 echo -en "----\nENTER to continue..."; read i 1.144 exit 1 1.145 fi
2.1 --- a/tazlitobox Sun Jan 24 19:44:46 2010 +0100 2.2 +++ b/tazlitobox Sun Jan 24 19:16:52 2010 +0000 2.3 @@ -277,7 +277,7 @@ 2.4 <label> 2.5 " 2.6 Get and build preconfigured flavors from the community. Flavors 2.7 -llist can be recharged from SliTaz mirror. Some addfiles can be 2.8 +list can be recharged from SliTaz mirror. Some addfiles can be 2.9 copied before generating the distro. 2.10 " 2.11 </label>