|
@ -39,6 +39,7 @@ readlink -f /bin/sh 2>&1 > /dev/null |
|
|
|
|
|
|
|
|
if [ "x-x" = "x${1:-}" ]; then |
|
|
if [ "x-x" = "x${1:-}" ]; then |
|
|
XTRACE=yes |
|
|
XTRACE=yes |
|
|
|
|
|
PS4='+${BASH_SOURCE:+$BASH_SOURCE:}$LINENO> ' |
|
|
shift |
|
|
shift |
|
|
set -x |
|
|
set -x |
|
|
else |
|
|
else |
|
@ -68,12 +69,39 @@ fi |
|
|
# switching to the right sde wrapper (SDEROOT specific) |
|
|
# switching to the right sde wrapper (SDEROOT specific) |
|
|
# |
|
|
# |
|
|
if [ "$( readlink -f "$0" )" != "$SDEROOT/bin/sde" ]; then |
|
|
if [ "$( readlink -f "$0" )" != "$SDEROOT/bin/sde" ]; then |
|
|
if [ "$1" = "--loop" ]; then |
|
|
|
|
|
|
|
|
if [ "--loop" = "${1:-}" ]; then |
|
|
echo_abort 2 'loop detected, abort.' |
|
|
echo_abort 2 'loop detected, abort.' |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
set -- ${XTRACE:+-x }--loop "$@" |
|
|
|
|
|
|
|
|
|
|
|
if [ -x "$SDEROOT/run.sh" ]; then |
|
|
|
|
|
exec "$SDEROOT/run.sh" sde --run-loop "$@" |
|
|
else |
|
|
else |
|
|
exec "$SDEROOT/bin/sde" ${XTRACE:+-x }--loop "$@" |
|
|
|
|
|
|
|
|
exec "$SDEROOT/bin/sde" "$@" |
|
|
|
|
|
fi |
|
|
|
|
|
elif [ -x "$SDEROOT/run.sh" ]; then |
|
|
|
|
|
if [ "yes" = "${SDE_VIA_RUN_SH:-}" ]; then |
|
|
|
|
|
# good |
|
|
|
|
|
while [ $# -gt 0 ]; do |
|
|
|
|
|
case "$1" in |
|
|
|
|
|
--run-loop|--loop) |
|
|
|
|
|
;; |
|
|
|
|
|
*) |
|
|
|
|
|
break ;; |
|
|
|
|
|
esac |
|
|
|
|
|
shift |
|
|
|
|
|
done |
|
|
|
|
|
elif [ "--run-loop" = "${1:-}" ]; then |
|
|
|
|
|
echo_abort 2 'loop detected, abort.' |
|
|
|
|
|
else |
|
|
|
|
|
if [ "--loop" = "${1:-}" ]; then |
|
|
|
|
|
shift |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
exec "$SDEROOT/run.sh" sde ${XTRACE:+-x }--run-loop "$@" |
|
|
fi |
|
|
fi |
|
|
elif [ "$1" = "--loop" ]; then |
|
|
|
|
|
|
|
|
elif [ "--loop" = "${1:-}" ]; then |
|
|
shift |
|
|
shift |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|