Makefile
changeset 518 3dd43161fc0e
parent 506 0ab510cb567d
child 543 77f7344600cb
--- a/Makefile	Tue Aug 28 17:23:55 2012 +0300
+++ b/Makefile	Tue Aug 28 18:24:57 2012 +0300
@@ -77,11 +77,12 @@
 	done
 	chmod a+x ~/.fvwm/FvwmKbdd.pl
 	for f in /etc/xdg/menus/*.menu; do \
-		f=$${f%.menu}; \
-		f=$${f#/etc/xdg/menus/}; \
-		python .fvwm/xdg2fvwm.py $$f >~/.fvwm/$$f.hook; \
-		echo "Read $$[HOME]/.fvwm/$$f.hook" >>~/.fvwm/config; \
-		echo "AddToMenu MenuMyRoot $$f Popup Menu-$$f" >>~/.fvwm/config; \
+		[ -f "$$f" ] || continue; \
+		fname=$${f%.menu}; \
+		fname=$${fname##*/}; \
+		python .fvwm/xdg2fvwm.py Menu-$$fname $$f >~/.fvwm/$$fname.hook; \
+		echo "Read $$[HOME]/.fvwm/$$fname.hook" >>~/.fvwm/config; \
+		echo "AddToMenu MenuMyRoot $$fname Popup Menu-$$fname" >>~/.fvwm/config; \
 	done
 	mkdir -p ~/.screenshot
 	for item in $(IFNONEXIST_ITEMS); do \