File: fsl_app_wrapper

package info (click to toggle)
fsl 4.1.9-7
  • links: PTS, VCS
  • area: non-free
  • in suites: wheezy
  • size: 35,756 kB
  • sloc: cpp: 125,927; tcl: 23,318; ansic: 10,079; sh: 8,505; xml: 1,478; makefile: 1,068; csh: 198
file content (35 lines) | stat: -rw-r--r-- 1,100 bytes parent folder | download | duplicates (2)
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
27
28
29
30
31
32
33
34
35
#! /bin/sh -e

# Copyright (C) 2007,2010 by Michael Hanke michael.hanke@gmail.com
# Copyright (C) 2009 by Mark Hymers <mark.hymers@ynic.york.ac.uk>
#
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

cmd=${0##*/}

if [ "${cmd}" = "fsl_app_wrapper" ]; then
    echo 'fsl_app_wrapper: This script should not be run like this, see fsl-4.1(1) for details' 1>&2
    exit 1
fi

# Set up the FSL paths if necessary (if the user hasn't overriden them

if [ -z "${FSLDIR}" ]; then
    . /etc/fsl/4.1/fsl.sh
fi

abs_cmd=${FSLDIR}/bin/${cmd}
if [ ! -x $abs_cmd ]; then
	# try stripping major version prefix
	abs_cmd=${FSLDIR}/bin/${cmd#fsl4.1-*}
fi

exec ${abs_cmd} $@