Commit f800cb6d authored by Dom Sekotill's avatar Dom Sekotill
Browse files

protect ~/.shell/funcs from re-sourcing

~/.shell/funcs sets SOURCED_SHELL_FUNCS=yes in the *shell* variables
(NOT environment variables) and returns early if the same is already
set.
parent 2b42458f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
#!/bin/sh

[ -n "$SOURCED_SHELL_FUNCS" ] && return
SOURCED_SHELL_FUNCS=yes

source_first()
{
	for sf in "$@"; do