mirror of
https://github.com/envmodules/modules.git
synced 2026-05-30 00:12:31 +08:00
init: always set code for silent_shell_debug code
Update initialization scripts to make the code for the silent_shell_debug mechanism always defined there.
This commit is contained in:
@@ -104,11 +104,6 @@ else
|
||||
usemanpathre := /@usemanpath@/d
|
||||
notusemanpathre := s|@notusemanpath@||g
|
||||
endif
|
||||
ifeq ($(silentshdbgsupport),y)
|
||||
silentshdbgsupportre := s|@silentshdbgsupport@||g
|
||||
else
|
||||
silentshdbgsupportre := /@silentshdbgsupport@/d
|
||||
endif
|
||||
|
||||
# comment entries if feature not enabled
|
||||
ifeq ($(versioning),y)
|
||||
@@ -181,7 +176,6 @@ sed -e 's|@prefix@|$(prefix)|g' \
|
||||
-e '$(setbinpathre)' \
|
||||
-e '$(appendbinpathre)' \
|
||||
-e '$(prependbinpathre)' \
|
||||
-e '$(silentshdbgsupportre)' \
|
||||
-e '$(usemanpathre)' \
|
||||
-e '$(notusemanpathre)' \
|
||||
-e $$'s|@modulerc@|$(modulerc)|g' \
|
||||
|
||||
36
init/bash.in
36
init/bash.in
@@ -1,15 +1,15 @@
|
||||
@silentshdbgsupport@unset _mlshdbg;
|
||||
@silentshdbgsupport@# disable shell debugging for the run of this init file
|
||||
@silentshdbgsupport@if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
|
||||
@silentshdbgsupport@ # immediately disable debugging to echo the less number of line possible
|
||||
@silentshdbgsupport@ case "$-" in
|
||||
@silentshdbgsupport@ *v*x*) set +vx; _mlshdbg='vx' ;;
|
||||
@silentshdbgsupport@ *v*) set +v; _mlshdbg='v' ;;
|
||||
@silentshdbgsupport@ *x*) set +x; _mlshdbg='x' ;;
|
||||
@silentshdbgsupport@ *) _mlshdbg='' ;;
|
||||
@silentshdbgsupport@ esac;
|
||||
@silentshdbgsupport@fi;
|
||||
@silentshdbgsupport@
|
||||
unset _mlshdbg;
|
||||
# disable shell debugging for the run of this init file
|
||||
if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
|
||||
# immediately disable debugging to echo the less number of line possible
|
||||
case "$-" in
|
||||
*v*x*) set +vx; _mlshdbg='vx' ;;
|
||||
*v*) set +v; _mlshdbg='v' ;;
|
||||
*x*) set +x; _mlshdbg='x' ;;
|
||||
*) _mlshdbg='' ;;
|
||||
esac;
|
||||
fi;
|
||||
|
||||
# define modules runtine quarantine configuration
|
||||
@setquarvars@export MODULES_RUN_QUARANTINE='@RUN_QUARANTINE@'
|
||||
@setquarvars@@export RUNENV_VAR='RUNENV_VAL'@
|
||||
@@ -94,9 +94,9 @@ if [ $_mlret -eq 0 ]; then
|
||||
fi
|
||||
|
||||
unset _mlcode _mlret
|
||||
@silentshdbgsupport@
|
||||
@silentshdbgsupport@# restore shell debugging options if disabled
|
||||
@silentshdbgsupport@if [ -n "${_mlshdbg:-}" ]; then
|
||||
@silentshdbgsupport@ set -$_mlshdbg;
|
||||
@silentshdbgsupport@ unset _mlshdbg;
|
||||
@silentshdbgsupport@fi;
|
||||
|
||||
# restore shell debugging options if disabled
|
||||
if [ -n "${_mlshdbg:-}" ]; then
|
||||
set -$_mlshdbg;
|
||||
unset _mlshdbg;
|
||||
fi;
|
||||
|
||||
36
init/ksh.in
36
init/ksh.in
@@ -1,15 +1,15 @@
|
||||
@silentshdbgsupport@unset _mlshdbg;
|
||||
@silentshdbgsupport@# disable shell debugging for the run of this init file
|
||||
@silentshdbgsupport@if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
|
||||
@silentshdbgsupport@ # immediately disable debugging to echo the less number of line possible
|
||||
@silentshdbgsupport@ case "$-" in
|
||||
@silentshdbgsupport@ *v*x*) set +vx; _mlshdbg='vx' ;;
|
||||
@silentshdbgsupport@ *v*) set +v; _mlshdbg='v' ;;
|
||||
@silentshdbgsupport@ *x*) set +x; _mlshdbg='x' ;;
|
||||
@silentshdbgsupport@ *) _mlshdbg='' ;;
|
||||
@silentshdbgsupport@ esac;
|
||||
@silentshdbgsupport@fi;
|
||||
@silentshdbgsupport@
|
||||
unset _mlshdbg;
|
||||
# disable shell debugging for the run of this init file
|
||||
if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
|
||||
# immediately disable debugging to echo the less number of line possible
|
||||
case "$-" in
|
||||
*v*x*) set +vx; _mlshdbg='vx' ;;
|
||||
*v*) set +v; _mlshdbg='v' ;;
|
||||
*x*) set +x; _mlshdbg='x' ;;
|
||||
*) _mlshdbg='' ;;
|
||||
esac;
|
||||
fi;
|
||||
|
||||
# define modules runtine quarantine configuration
|
||||
@setquarvars@export MODULES_RUN_QUARANTINE='@RUN_QUARANTINE@'
|
||||
@setquarvars@@export RUNENV_VAR='RUNENV_VAL'@
|
||||
@@ -83,9 +83,9 @@ if [ $_mlret -eq 0 ]; then
|
||||
fi
|
||||
|
||||
unset _mlcode _mlret
|
||||
@silentshdbgsupport@
|
||||
@silentshdbgsupport@# restore shell debugging options if disabled
|
||||
@silentshdbgsupport@if [ -n "${_mlshdbg:-}" ]; then
|
||||
@silentshdbgsupport@ set -$_mlshdbg;
|
||||
@silentshdbgsupport@ unset _mlshdbg;
|
||||
@silentshdbgsupport@fi;
|
||||
|
||||
# restore shell debugging options if disabled
|
||||
if [ -n "${_mlshdbg:-}" ]; then
|
||||
set -$_mlshdbg;
|
||||
unset _mlshdbg;
|
||||
fi;
|
||||
|
||||
36
init/sh.in
36
init/sh.in
@@ -1,15 +1,15 @@
|
||||
@silentshdbgsupport@unset _mlshdbg;
|
||||
@silentshdbgsupport@# disable shell debugging for the run of this init file
|
||||
@silentshdbgsupport@if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
|
||||
@silentshdbgsupport@ # immediately disable debugging to echo the less number of line possible
|
||||
@silentshdbgsupport@ case "$-" in
|
||||
@silentshdbgsupport@ *v*x*) set +vx; _mlshdbg='vx' ;;
|
||||
@silentshdbgsupport@ *v*) set +v; _mlshdbg='v' ;;
|
||||
@silentshdbgsupport@ *x*) set +x; _mlshdbg='x' ;;
|
||||
@silentshdbgsupport@ *) _mlshdbg='' ;;
|
||||
@silentshdbgsupport@ esac;
|
||||
@silentshdbgsupport@fi;
|
||||
@silentshdbgsupport@
|
||||
unset _mlshdbg;
|
||||
# disable shell debugging for the run of this init file
|
||||
if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
|
||||
# immediately disable debugging to echo the less number of line possible
|
||||
case "$-" in
|
||||
*v*x*) set +vx; _mlshdbg='vx' ;;
|
||||
*v*) set +v; _mlshdbg='v' ;;
|
||||
*x*) set +x; _mlshdbg='x' ;;
|
||||
*) _mlshdbg='' ;;
|
||||
esac;
|
||||
fi;
|
||||
|
||||
# define modules runtine quarantine configuration
|
||||
@setquarvars@export MODULES_RUN_QUARANTINE='@RUN_QUARANTINE@'
|
||||
@setquarvars@@export RUNENV_VAR='RUNENV_VAL'@
|
||||
@@ -92,9 +92,9 @@ if [ $_mlret -eq 0 ]; then
|
||||
fi
|
||||
|
||||
unset _mlcode _mlret
|
||||
@silentshdbgsupport@
|
||||
@silentshdbgsupport@# restore shell debugging options if disabled
|
||||
@silentshdbgsupport@if [ -n "${_mlshdbg:-}" ]; then
|
||||
@silentshdbgsupport@ set -$_mlshdbg;
|
||||
@silentshdbgsupport@ unset _mlshdbg;
|
||||
@silentshdbgsupport@fi;
|
||||
|
||||
# restore shell debugging options if disabled
|
||||
if [ -n "${_mlshdbg:-}" ]; then
|
||||
set -$_mlshdbg;
|
||||
unset _mlshdbg;
|
||||
fi;
|
||||
|
||||
36
init/zsh.in
36
init/zsh.in
@@ -1,15 +1,15 @@
|
||||
@silentshdbgsupport@unset _mlshdbg;
|
||||
@silentshdbgsupport@# disable shell debugging for the run of this init file
|
||||
@silentshdbgsupport@if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
|
||||
@silentshdbgsupport@ # immediately disable debugging to echo the less number of line possible
|
||||
@silentshdbgsupport@ case "$-" in
|
||||
@silentshdbgsupport@ *v*x*) set +vx; _mlshdbg='vx' ;;
|
||||
@silentshdbgsupport@ *v*) set +v; _mlshdbg='v' ;;
|
||||
@silentshdbgsupport@ *x*) set +x; _mlshdbg='x' ;;
|
||||
@silentshdbgsupport@ *) _mlshdbg='' ;;
|
||||
@silentshdbgsupport@ esac;
|
||||
@silentshdbgsupport@fi;
|
||||
@silentshdbgsupport@
|
||||
unset _mlshdbg;
|
||||
# disable shell debugging for the run of this init file
|
||||
if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
|
||||
# immediately disable debugging to echo the less number of line possible
|
||||
case "$-" in
|
||||
*v*x*) set +vx; _mlshdbg='vx' ;;
|
||||
*v*) set +v; _mlshdbg='v' ;;
|
||||
*x*) set +x; _mlshdbg='x' ;;
|
||||
*) _mlshdbg='' ;;
|
||||
esac;
|
||||
fi;
|
||||
|
||||
# define modules runtine quarantine configuration
|
||||
@setquarvars@export MODULES_RUN_QUARANTINE='@RUN_QUARANTINE@'
|
||||
@setquarvars@@export RUNENV_VAR='RUNENV_VAL'@
|
||||
@@ -86,9 +86,9 @@ if [ $_mlret -eq 0 ]; then
|
||||
fi
|
||||
|
||||
unset _mlcode _mlret
|
||||
@silentshdbgsupport@
|
||||
@silentshdbgsupport@# restore shell debugging options if disabled
|
||||
@silentshdbgsupport@if [ -n "${_mlshdbg:-}" ]; then
|
||||
@silentshdbgsupport@ set -$_mlshdbg;
|
||||
@silentshdbgsupport@ unset _mlshdbg;
|
||||
@silentshdbgsupport@fi;
|
||||
|
||||
# restore shell debugging options if disabled
|
||||
if [ -n "${_mlshdbg:-}" ]; then
|
||||
set -$_mlshdbg;
|
||||
unset _mlshdbg;
|
||||
fi;
|
||||
|
||||
Reference in New Issue
Block a user