SF.net SVN: morphix: [2193] trunk/morph-scripts/module-builder.pl

[email protected]
Newsgroups gmane.linux.morphix.cvs
Message-ID <[email protected]>
Revision: 2193
Author:   alextreme
Date:     2006-04-01 07:55:41 -0800 (Sat, 01 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/morphix/?rev=2193&view=rev

Log Message:
-----------
  * committing -b (best compression)

Modified Paths:
--------------
    trunk/morph-scripts/module-builder.pl
Modified: trunk/morph-scripts/module-builder.pl
===================================================================
--- trunk/morph-scripts/module-builder.pl	2006-04-01 10:26:11 UTC (rev 2192)
+++ trunk/morph-scripts/module-builder.pl	2006-04-01 15:55:41 UTC (rev 2193)
@@ -21,15 +21,16 @@
     print "module-builer, for Morphix/KNOPPIX based distros\n\n";
     print "Usage:\n";
     print "module-builder.pl [OPTIONS...] unpacked-module-directory outputfile.mod\n";
-    print "\n OPTIONs:\n\t-t FSTYPE - set the file system type (default: iso9660)\n";
+    print "\n OPTIONS:\n\t-t FSTYPE - set the file system type (default: iso9660)\n";
     print "\t-l 'LABEL' - set the CD label (default: Morphix)\n";
-    print "\n FSTYPEs:\n\text3 - slower buildtime, better compression, cowloop-overlayable\n";
-    print "\tiso9660 - faster, default. Only overlayable with translucency/mini_fo\n";
+    print "\t-b - use -b flag for create_compressed_fs, best compression\n";
+    print "\n FSTYPE:\n\text3 - use only with cowloop\n";
+    print "\tiso9660 - faster, default. Works with unionfs, and the older translucency and mini_fo\n";
 }
 
 # TODO: make a shellscript out of this, or C + getopt. Perl is driving me nuts!
 
-if (@ARGV != 2 && @ARGV != 4 && @ARGV != 6) {
+if (@ARGV < 2) {
     usage();
     exit 1;
 }
@@ -42,11 +43,16 @@
 our $label = "Morphix";
 our $tmpdir = "/tmp";
 our $utime = time();
+our $ccfoptions = "";
 
 
-
 for ($i = 0; $i < @ARGV; $i++) {
     $var = $ARGV[$i];
+	
+    if ($var eq "-b") {
+	$ccfoptions += " -b ";
+	next;
+    }
 
     if ($var eq "-t") {
 	$i++;
@@ -112,7 +118,7 @@
     (system("rm -f $tmpdir/modfile$utime") == 0) or die;
         
 } elsif ($fstype eq "iso9660") {
-	system "mkisofs -iso-level 4 -R -U -V \"$label\" -publisher \"$label\" -hide-rr-moved -cache-inodes -no-bak -pad $moddir | nice -5 create_compressed_fs - 65536 > $output";
+	system "mkisofs -iso-level 4 -R -U -V \"$label\" -publisher \"$label\" -hide-rr-moved -cache-inodes -no-bak -pad $moddir | nice -5 create_compressed_fs $ccfoptions - 65536 > $output";
 }
 print("Your module should now be available as $output\n")
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.