updated on Fri Jan 13 04:01:25 UTC 2012
[aur-mirror.git] / jffmpeg / jmfUnregisterJffmpegPlugin
blobaebadc220cb98aca9915033051ed4c990a183d4a
1 #!/bin/sh
3 # A script to launch the JMStudio java application.
6 # If a path name is a symbolic link, resolve it.
8 GetRealPath()
10 pathName="$1"
11 level=1
13 while [ -h "$pathName" ] ; do
14 level=`/bin/expr $level + 1`
15 if [ $level -gt 10 ] ; then
16 echo "$pathName: too many levels of symbolic links"
17 break;
21 # First, make sure we have an absolute path name.
23 if IsRelativePath "$pathName" ; then
24 pathName=`/bin/pwd`/"$pathName"
28 # Then determine where the link points (via "ls -l")
30 dirName=`/bin/dirname $pathName`
31 link=`/bin/ls -l $pathName | sed -e 's,.* -> ,,g'`
33 if IsRelativePath "$link" ; then
34 pathName="$dirName"/"$link"
35 else
36 pathName="$link"
38 done
40 echo "$pathName"
42 return 0
46 # Is this a relative path name (i.e., doesn't begin with "/")?
48 IsRelativePath()
50 pathName="$1"
52 if [ `echo "$pathName" | sed -e 's,^/.*,absolute,g'` = "absolute" ] ; then
53 return 1
54 else
55 return 0
60 # Figure out the real path to this shell script and then setup
61 # the JMFHOME environment
63 PROGPATH=`GetRealPath $0`
64 TMPDIR=`dirname $PROGPATH`
65 JMFHOME=`( cd $TMPDIR/.. && /bin/pwd )`; export JMFHOME
67 CLASSPATH=${JMFHOME}/lib/jmf.jar:${JMFHOME}/lib:${JMFHOME}/lib/sound.jar:${CLASSPATH}; export CLASSPATH
69 LD_LIBRARY_PATH=.:/usr/openwin/lib:${JMFHOME}/lib:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
71 # Use this to run with native threads:
72 # THREADS_FLAG=native; export THREADS_FLAG
74 # If it's running on Solaris 2.6, we are forced to use native threads.
75 UNAME=`uname -r`
76 case $UNAME in
77 5.6) THREADS_FLAG=native; export THREADS_FLAG;;
78 5.6.*) THREADS_FLAG=native; export THREADS_FLAG;;
79 5.7) THREADS_FLAG=native; export THREADS_FLAG;;
80 5.7.*) THREADS_FLAG=native; export THREADS_FLAG;;
81 5.8) THREADS_FLAG=native; export THREADS_FLAG;;
82 5.8.*) THREADS_FLAG=native; export THREADS_FLAG;;
83 esac
85 if [ $# -gt 0 ]; then
86 FILE=$1
88 exec java unregisterJffmpeg $*