mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Only restore set -x option if it was previously set
This commit is contained in:
parent
9a221a8d0b
commit
c94a7614ad
1 changed files with 2 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
||||||
# -*- shell-script -*-
|
# -*- shell-script -*-
|
||||||
|
|
||||||
|
readonly XTRACE_ENABLE=$(set +o | grep xtrace) # This is a trick to later only restore set -x if it was set when calling this script
|
||||||
set +x
|
set +x
|
||||||
for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null) ; do
|
for helper in $(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null) ; do
|
||||||
[ -r $helper ] && . $helper || true
|
[ -r $helper ] && . $helper || true
|
||||||
done
|
done
|
||||||
set -x
|
eval "$XTRACE_BKP"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue