]> git.proxmox.com Git - grub2.git/blame - gencmdlist.sh
2009-11-24 Felix Zielcke <fzielcke@z-51.de>
[grub2.git] / gencmdlist.sh
CommitLineData
7b1f4b57 1#! /bin/sh
2#
3# Copyright (C) 2005 Free Software Foundation, Inc.
4#
5# This gensymlist.sh is free software; the author
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14# Read source code from stdin and detect command names.
15
16module=$1
17
b1b797cb 18grep -v "^#" | sed -n \
19 -e "/grub_register_command *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $module/;p;}" \
fb14123e 20 -e "/grub_register_extcmd *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $module/;p;}" \
21 -e "/grub_register_command_p1 *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $module/;p;}"
22