changeset 307:e6a201119439

Tweak from Tony Przygienda that triples the speed of miniconfig creation script.
author Rob Landley <rob@landley.net>
date Wed, 27 Feb 2008 23:06:26 -0600
parents 358ef8a27085
children 386a43b33209
files sources/toys/miniconfig.sh
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sources/toys/miniconfig.sh	Wed Feb 27 22:32:25 2008 -0600
+++ b/sources/toys/miniconfig.sh	Wed Feb 27 23:06:26 2008 -0600
@@ -35,11 +35,12 @@
   diff -u "$1" .config
 fi
 cp .config .big.config
-cp .config mini.config
+grep -v '^[#$]' .config | grep -v '^$' > mini.config
+#cp .config mini.config
 
 echo "Calculating mini.config..."
 
-LENGTH=`cat $1 | wc -l`
+LENGTH=`cat mini.config | wc -l`
 
 # Loop through all lines in the file 
 I=1