[Pkg-voip-commits] r3183 - freepbx/trunk/debian/contrib

Diego Iastrubni elcuco-guest at alioth.debian.org
Thu Mar 1 11:39:31 CET 2007


Author: elcuco-guest
Date: 2007-03-01 11:39:31 +0100 (Thu, 01 Mar 2007)
New Revision: 3183

Modified:
   freepbx/trunk/debian/contrib/fpx-modules
Log:
the module-building-super-cool-script can handle non existing modules - 
some modules we don't ship and upstream provides.

todo:
	how about modules that we ship and upstream does not...? 



Modified: freepbx/trunk/debian/contrib/fpx-modules
===================================================================
--- freepbx/trunk/debian/contrib/fpx-modules	2007-02-28 17:45:20 UTC (rev 3182)
+++ freepbx/trunk/debian/contrib/fpx-modules	2007-03-01 10:39:31 UTC (rev 3183)
@@ -382,23 +382,29 @@
 	
 	foreach( $local_modules as $module )
 	{	
-		print( "Building " . $module["displayName"] . "..." );
-		if (($debug) || ($verbose)){
-			print("\n");
-		}
 		
-		debug( "cd modules/freepbx-module-" . $module["rawname"] );
-		chdir( "modules/freepbx-module-" . $module["rawname"] );
+		$new_dir = "modules/freepbx-module-" . $module["rawname"];
+		debug( "cd $new_dir" );
+		if ( file_exists($new_dir) && chdir($new_dir) )
+		{		
+			print( "Building " . $module["displayName"] . "..." );
+			if (($debug) || ($verbose)){
+				print("\n");
+			}
+
+			if (exec_cmd( "echo y | debuild -uc -us -rfakeroot &> build.log" ) == 0){
+				print( " ok.\n" );
+			}
+			else{
+				print( "., ERROR, see the build log at the module directory.\n" );
+			}
 		
-		if (exec_cmd( "echo y | debuild -uc -us -rfakeroot &> build.log" ) == 0){
-			print( " ok.\n" );
+			debug( "cd ../../" );
+			chdir( "../../" );
 		}
-		else{
-			print( "., ERROR, see the build log at the module directory.\n" );
+		else {
+			print( "Ignoring non existing module - " . $module["displayName"] . "\n" );
 		}
-		
-		debug( "cd ../../" );
-		chdir( "../../" );
 	}
 	
 	if ($verbose)




More information about the Pkg-voip-commits mailing list