1 #!/usr/bin/install-menu
6 outputencoding="LOCALE";
9 rootprefix="/var/lib/e16/";
10 userprefix=".e16/menus_debian/";
11 mainmenutitle="Debian Menu";
13 function menu_sh() = prefix() "debian_menu_sh";
14 prerun="set -e; rm -f " prefix() "debian*menu/" menu_sh();
15 postrun="set -e; cat " menu_sh() " | sh; rm -f " menu_sh();
17 function quote($text)= "\"" replacewith($text,"\"","'") "\"";
18 function tick($text)= "'" escwith($text,"'", "'\\'") "'";
20 function space()= " ";
21 function newline()="\n";
23 function entry($com)= quote(title()) space()
24 ifelse(icon(),quote(icon()),"NULL") space()
29 wm= entry(quote("eesh -e " tick("exit exec " $command)) newline());
30 x11= entry(quote($command) newline());
31 text= entry(quote(term()) newline());
34 function etitle()= esc(tolower(replacewith(replace("/" $section,"//",""),"/ ","__") ".menu"),"()");
36 startmenu= "cat > " prefix() tick(etitle()) " << 'END'" newline() quote(title()) newline();
38 endmenu= "END" newline() newline();
40 submenutitle=quote(title()) " NULL menu " quote(prefix() etitle()) "\n";
42 genmenu="debian_menu_sh";