Project

General

Profile

« Previous | Next » 

Revision 8704

bugfix: lib/util.run: added include guard to prevent issues in "diamond includes", where a runscript includes two runscripts and each includes util.run, causing the second include of util.run to reset any methods overridden in the first included runscript. this prevents util.run from being included twice in the first place.

View differences:

lib/util.run
27 27
	test -z "${!include_guard+t}" && eval "$include_guard"=1
28 28
}
29 29

  
30
if self_not_included "${BASH_SOURCE[0]}"; then
31

  
30 32
set_var () { eval "$1"'="$2"'; }
31 33

  
32 34
reverse () # usage: array=($(reverse args...))
......
132 134
alias unzip="echo_run unzip"
133 135
alias zip_newer="zip -u"
134 136
alias unzip_newer="unzip -u -o" # -o is safe b/c -u only extracts newer files
137

  
138
fi

Also available in: Unified diff