You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
771 B
33 lines
771 B
export package=framework
|
|
export field=0
|
|
|
|
while [ "$1" != "" ]
|
|
do
|
|
case $1 in
|
|
--help ) field=0 ;;
|
|
--version ) field=-1 ;;
|
|
--prefix ) field=-2 ;;
|
|
--prefix=* ) prefix="${i#--prefix=}" ;;
|
|
--cflags ) field=2 ;;
|
|
--libs ) field=3 ;;
|
|
--list ) field=1; package="" ;;
|
|
* ) package=$1 ;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
if [ "$field" = "0" ]
|
|
then echo "Usage: mlt-config [ --version ] | [ --prefix=dir ] [ [ package ] [ --cflags ] [ --libs ] ]"
|
|
elif [ "$field" = "-1" ]
|
|
then echo $version
|
|
elif [ "$field" = "-2" ]
|
|
then config=`which mlt-config`
|
|
dir=`dirname $config`
|
|
dir=`dirname $dir`
|
|
echo $dir
|
|
elif [ -f "$prefix/share/mlt/packages.dat" ]
|
|
then grep "^$package" $prefix/share/mlt/packages.dat | cut -f $field
|
|
else echo mlt-config cannot find package $package.
|
|
fi
|
|
|