Browse Source

sde: add optional `-x` support for `set -x` the sde frontend

Signed-off-by: Alejandro Mery <amery@geeks.cl>
master
Alejandro Mery 4 years ago
parent
commit
46b7084bf6
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      bin/sde

+ 9
- 1
bin/sde

@ -37,6 +37,14 @@ readlink -f /bin/sh 2>&1 > /dev/null
[ $? -eq 0 ] ||
echo_abort 1 '`readlink` doesnt support -f, please update it.'
if [ "x-x" = "x${1:-}" ]; then
XTRACE=yes
shift
set -x
else
XTRACE=
fi
# find libsde.in
#
if [ -z "$SDEROOT" ]; then
@ -63,7 +71,7 @@ if [ "$( readlink -f "$0" )" != "$SDEROOT/bin/sde" ]; then
if [ "$1" = "--loop" ]; then
echo_abort 2 'loop detected, abort.'
else
exec "$SDEROOT/bin/sde" --loop "$@"
exec "$SDEROOT/bin/sde" ${XTRACE:+-x }--loop "$@"
fi
elif [ "$1" = "--loop" ]; then
shift

Loading…
Cancel
Save