File: afterstep.menu-method

package info (click to toggle)
afterstep 2.2.12-18.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 33,184 kB
  • sloc: ansic: 201,695; sh: 5,894; xml: 3,721; makefile: 2,094; perl: 1,558; cpp: 811
file content (43 lines) | stat: -rw-r--r-- 1,111 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/install-menu
#
# Generates AfterStep menus for all registered applications.
# Depends on the menus generated by menu-xdg package.
#
!include menu.h

compat="menu-2"
outputencoding="UTF-8";
outputlanguage="C";


genmenu=ifnempty($section, ifempty($command, $section "/.include"));

rootprefix="/var/lib/afterstep/menu/Debian";
onlyrunasroot=true;
treewalk=(M);
rootsection="";
preoutput="";

# Clean-up files we may have generated in an earlier run first.
prerun="test -e \"" prefix() "\" &&  find \"" prefix() "\" -type f -exec rm {} \\;";

# And remove any empty directories afterwards
postrun="find \"" prefix() "\" -depth -mindepth 2 -type d -print0 | xargs -0r rmdir --ignore-fail-on-non-empty";


removemenu = "test -d \"" prefix() "\" && ("
             "find \"" prefix() "\" -type f -exec rm {} \\; ;"
             "find \"" prefix() "\" -depth -type d -exec rmdir {} \\; )";


supported;
  x11=    ;
  text=   ; 
endsupported;

mainmenutitle="";
submenutitle= "";

startmenu= "FolderReference \"" title() "\"\n"
	   "Category  \"X-Debian" replacewith($section,"/ ","--") "\"\n";
endmenu="";