File: fsl_app_wrapper

package info (click to toggle)
fsl 5.0.7-4
  • links: PTS, VCS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 23,384 kB
  • ctags: 17,864
  • sloc: cpp: 166,701; tcl: 25,434; sh: 14,545; ansic: 9,707; makefile: 1,332; python: 151; xml: 106; csh: 17
file content (34 lines) | stat: -rw-r--r-- 1,109 bytes parent folder | download
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
#! /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-5.0(1) for details' 1>&2
    exit 1
fi

# Set up the FSL paths if necessary
# do not allows user-override, as this wrapper is used via
# versioned symlinks
. /etc/fsl/5.0/fsl.sh

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

exec ${abs_cmd} $@