Added lots more modules from lintian. Maemian appears to work.
[maemian] / collection / strings
1 #!/bin/sh -e
2 # strings -- maemian collection script
3
4 # Copyright (C) 2009 Raphael Geissert <atomo64@gmail.com>
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, you can find it on the World Wide
18 # Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
19 # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
20 # MA 02110-1301, USA.
21
22 [ $# -eq 2 ] || {
23     echo "Syntax: strings <pkg> <type>"
24     exit 1
25 }
26
27 [ ! -f elf-index ] || rm -f elf-index
28 exec >elf-index
29
30 for bin in $(sed -rn 's/:\s+\bELF\b.+$//g;T;p' file-info); do
31     echo "$bin"
32     case $bin in
33       /usr/lib/debug/*)
34         ;;
35       *)
36         mkdir -p "strings/$(dirname "$bin")"
37         strings "unpacked/$bin" > "strings/$bin"
38         ;;
39     esac
40 done