qualitfy paths of known properties that take a filename with server virtual root
[melted] / mlt-config-template
1 export package=framework
2 export field=0
3
4 while [ "$1" != "" ]
5 do
6         case $1 in
7                 --help )                field=0 ;;
8                 --version )             field=-1 ;;
9                 --prefix=* )    prefix="${i#--prefix=}" ;;
10                 --cflags )              field=2 ;;
11                 --libs )                field=3 ;;
12                 --list )                field=1; package="" ;;
13                 * )                             package=$1 ;;
14         esac
15         shift
16 done
17
18 if [ "$field" = "0" ]
19 then    echo "Usage: mlt-config [ --version ] | [ --prefix=dir ] [ [ package ] [ --cflags ] [ --libs ] ]"
20 elif [ "$field" = "-1" ]
21 then    echo $version
22 elif [ -f "$prefix/share/mlt/packages.dat" ]
23 then grep "^$package" $prefix/share/mlt/packages.dat | cut -f $field
24 else echo mlt-config cannot find package $package.
25 fi
26