File: getGimVersion.sh

package info (click to toggle)
mtink 1.0.16-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,480 kB
  • ctags: 1,349
  • sloc: ansic: 19,263; sh: 1,008; python: 626; xml: 444; makefile: 75
file content (26 lines) | stat: -rwxr-xr-x 516 bytes parent folder | download | duplicates (9)
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