1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#!/bin/sh
# check for the gimp plugin directory
getGimptoolDir()
{
for dir in `echo $PATH | tr ':' ' '`
do
if [ -x $dir/gimptool ]
then
echo $dir
break;
fi
done
}
# this work perfectly with gimp 1.0, 1.1 and 1.2.
# gimptool will alway fail but we can get the wanted path
getDir()
{
sh -x $gimptoolDir/gimptool ---install-admin-bin t.sh --just-print --dry-run 2>&1 | tee -a /dev/tty| sed -n 's/.*plug[_]*in[_]*dir=\(.*\)/\1/p'
}
gimptoolDir=`getGimptoolDir`
getDir
|