Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/scripts
Modified Files:
e_gen_menu
Log Message:
Don't die on broken links.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/scripts/e_gen_menu,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- e_gen_menu 25 Oct 2003 13:11:46 -0000 1.29
+++ e_gen_menu 11 Dec 2003 18:02:02 -0000 1.30
@@ -140,6 +140,11 @@
local $Name, $Exec, $Icon, $Cats, $Type, $File;
local $c;
+ if (! -f "$f") {
+ print "Not found: $f\n" if $dbg ge 1;
+ return;
+ }
+
# Global ref no
$N++;
@@ -147,7 +152,7 @@
$Cats = shift;
$Type = shift;
- open(FI,$f) or die "Not found: $f\n";
+ open(FI,$f) or return;
while (<FI>) {
if (/^Name=(.*)$/) {
$Name = $1;
@@ -323,10 +328,10 @@
}
# Make top- and sub-menus
- open(FTopM, ">$dir/index.menu") or die "What? $dir/index.menu";
+ open(FTopM, ">$dir/index.menu") or die "*** Couldn't create $dir/index.menu\n";
print FTopM "\"$type Menu\"\n";
foreach $m (sort(keys(%menus))) {
- open(FSubM, ">$dir/$m.menu") or die "What? $dir/$m.menu";
+ open(FSubM, ">$dir/$m.menu") or die "*** Couldn't create
$dir/$m.menu\n";
print "- Submenu: $m\n" if $dbg ge 2;
print FTopM "\"$m\" \"\" menu \"$dir/$m.menu\"\n";
print FSubM "\"$m\"\n";
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs