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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#!/usr/bin/install-menu
# I need menu-1!
# $Id: dwww.menu-method,v 1.11 2006-05-07 18:30:09 robert Exp $
#
# Dwww compatibility menu-method to create
# in /var/lib/dwww/menu-method directory docbase-like
# files structure
#
# NOTE: the first line of this script _must_ be
# equal to "#!/usr/bin/install-menu", otherwise update-menus
# will feed this script old-compat-mode data.
#
# More info: /usr/share/doc/menu/html.
#
compat="menu-1"
!include menu.h
compat="menu-2"
function header()=
"Dwww-Section: " $section "\n"
ifelse($longtitle
,
"Title: " $longtitle "\n"
"Dwww-Title: " $title "\n"
,
"Title: " $title "\n"
)
"Abstract: " $description "\n"
"\n";
supported;
dwww = header()
"Format: HTML\n"
"Index: "$command "\n"
"Files: "$command "\n";
url = header()
"Format: Dwww-URL\n"
"Index: "$command "\n"
"Files: "$command "\n";
endsupported;
preoutput= "";
startmenu= "";
endmenu= "";
mainmenutitle= "";
submenutitle= "";
rootsection= "";
outputlanguage= "C";
prerun= "find " prefix() " -type f -exec rm -f {} \\;";
postrun= "/usr/sbin/dwww-build-menu";
genmenu= ifelse($command, replacewith(cppesc($title), "$", "-"), "/");
removemenu= "find " prefix() " -type f -exec rm -f {} \\;";
rootprefix= "/var/lib/dwww/menu-method/";
treewalk= "(mc)";
|