From 8a7ca030b731e308e4a2516c72efa90bd41d4bdf Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 9 Feb 2021 17:39:17 +0100 Subject: Remember if we were sourced and don't do it again Sourcing slx-tools again would overwrite all already pulled in functions with their respective stubs again, so prevent that from happening. --- slx-tools.template | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slx-tools.template b/slx-tools.template index 7adf6c0..35dbb4d 100644 --- a/slx-tools.template +++ b/slx-tools.template @@ -3,6 +3,9 @@ # Collection of small ash functions utilized in various scripts. ################################################################################ +[ -n "$slx_tools_SOURCED" ] && return 0 +slx_tools_SOURCED=1 + case "$PATH" in *opt/openslx*) ;; *) export PATH="$PATH:/opt/openslx/bin:/opt/openslx/sbin" ;; -- cgit v1.2.3-55-g7522