* DataGrid.cs: the Alt+0 handling was wrong, it should have been
[mono-project.git] / scripts / mono-find-provides.in
blobde468c27e685d0c96086dd1f0aadab8c38e75d74
1 #!/bin/bash
3 # mono-find-provides
5 # Authors:
6 # Ben Maurer (bmaurer@ximian.com)
8 # (C) 2005 Novell (http://www.novell.com)
11 IFS=$'\n'
12 filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/'))
13 monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$"))
15 # Only include files with /gac/ in path
16 # (Allows packages to contain private assemblies that don't conflict with other packages)
17 #monolist=($(printf "%s\n" "${monolist[@]}" | egrep "/gac/"))
18 # Disabled... see ChangeLog
20 a=`which "$0"`
21 d=`dirname "$a"`
23 # Set the prefix, unless it is overriden (used when building mono rpms)
24 : ${prefix=$d/..}
26 exec_prefix=$d/..
27 libdir=$prefix/@reloc_libdir@
28 bindir=$d
30 # Bail out if monodis or libmono is missing
31 if [ ! -x $bindir/monodis ] || [ ! -f $libdir/libmono.so ] ; then
32 echo "monodis missing or unusable, exiting..."
33 exit 1
37 # set LD_LIBRARY_PATH to ensure that libmono.so is found
38 export LD_LIBRARY_PATH=$libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
40 for i in "${monolist[@]}"; do
41 ($bindir/monodis --assembly $i | awk '
42 BEGIN { LIBNAME=""; VERSION=""; }
43 /^Version:/ { VERSION=$2 }
44 /^Name:/ { LIBNAME=$2 }
45 END {
46 if (LIBNAME ~ /^policy/) {
47 cnt = split(LIBNAME, toks, ".")
48 VERSION=toks[2] "." toks[3] ".0.0"
49 LIBNAME=""
50 for (i=4; i<= cnt; i++)
51 LIBNAME = (LIBNAME toks[i] ".")
52 LIBNAME=substr(LIBNAME, 1, length(LIBNAME)-1)
54 if (VERSION && LIBNAME)
55 print "mono(" LIBNAME ") = " VERSION
57 ') 2>/dev/null
58 done