summaryrefslogtreecommitdiff
blob: 34520ffef78aea46f1b3ce3727a1b75cdb52c634 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
# Copyright 2009-2011 Gentoo Foundation
# Distributed under the terms of the MIT/X11 license

# Wrapper script, executes ${@VAR@} with arguments $@

if [ -z "${@VAR@}" ]; then
    # Try to get @VAR@ from system profile
    @VAR@=$(. /etc/profile &>/dev/null; echo "${@VAR@}")
fi

if [ -z "${@VAR@}" ]; then
    echo "$0: The @VAR@ variable must be set" >&2
    exit 1
fi

exec ${@VAR@} "$@"