[Lunar-commits] r15140 - lunar-iso/trunk/scripts

Auke Kok sofar at lunar-linux.org
Sat May 28 14:59:48 UTC 2005


Author: sofar
Date: 2005-05-28 14:59:48 +0000 (Sat, 28 May 2005)
New Revision: 15140

Modified:
   lunar-iso/trunk/scripts/proper
Log:
This doesn't save space at all, so don't use it.


Modified: lunar-iso/trunk/scripts/proper
===================================================================
--- lunar-iso/trunk/scripts/proper	2005-05-28 14:49:42 UTC (rev 15139)
+++ lunar-iso/trunk/scripts/proper	2005-05-28 14:59:48 UTC (rev 15140)
@@ -7,8 +7,6 @@
 echo "Broken compiles:"
 (cd $ISO_TARGET/var/build && ls -1)
 echo ""
-echo "Press ENTER to continue with cleanup && .iso generation"
-read
 
 umount $ISO_TARGET/proc &> /dev/null
 umount $ISO_TARGET/dev &> /dev/null
@@ -89,5 +87,32 @@
 rm -rf $ISO_TARGET/usr/src $ISO_TARGET/var/build
 mkdir -p $ISO_TARGET/usr/src $ISO_TARGET/var/build
 
+# re-pack tarballs
+if [ "$ISO_REDUCE" == 1 ]; then
+  SIZE_IN=$(du -k $ISO_TARGET/var/cache/lunar/ | cut -f1)
+  echo "+ stripping install cache tarballs"
+  for TARBZ in $(ls -1 $ISO_TARGET/var/cache/lunar/*bz2); do
+    echo -n "++ $(basename $TARBZ)"
+    tar xj -C $ISO_TARGET/var/build -f $TARBZ > /dev/null 2>&1
+    LINES=$(cat $ISO_TARGET/var/build/var/log/lunar/install/* | wc -l)
+    DELETED=0
+    while read ITEM ; do
+      if [ -e "$ISO_TARGET/$ITEM" ]; then
+        (( DELETED++ ))
+	rm -f "$ISO_TARGET/var/build/$ITEM" > /dev/null 2>&1
+      fi
+    done < $ISO_TARGET/var/build/var/log/lunar/install/*
+    echo -n " ( $(echo $DELETED) / $(echo $LINES) )"
+    rm -f $TARBZ
+    tar cj -C $ISO_TARGET/var/build -f $TARBZ . > /dev/null 2>&1
+    echo " OK"
+    rm -rf $ISO_TARGET/var/build
+    mkdir -p $ISO_TARGET/var/build
+  done
+  SIZE_OUT=$(du -k $ISO_TARGET/var/cache/lunar/ | cut -f1)
+  echo "Size in : ${SIZE_IN}k"
+  echo "Size out: ${SIZE_OUT}k"
+fi
+
 touch $ISO_TARGET/.proper
 



More information about the Lunar-commits mailing list