(search_file): Improve error message.
[grub2/phcoder/solaris.git] / genparttoollist.sh
blobc7ffc81b6c75644c329fd46d6c805fb6917bd2a9
1 #! /bin/sh
3 # Copyright (C) 2009 Free Software Foundation, Inc.
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.
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.
14 # Read source code from stdin and detect parttool names.
16 module=$1
18 grep -v "^#" | sed -n \
19 -e "/grub_parttool_register *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $module/;p;}"