Project

General

Profile

« Previous | Next » 

Revision 9018

lib/sh/util.sh: added separate include guard around the include guard utils so they don't have to be redefined on every include of util.sh

View differences:

lib/sh/util.sh
1 1
#!/bin/bash -e
2 2
set -o errexit # in case caller did not have -e in #! line
3 3

  
4
if test ! "$_util_sh_include_guard_utils"; then
5
_util_sh_include_guard_utils=1
6

  
4 7
function extern () { (exec "$@") || return; }
5 8

  
6 9
isset () { test -n "${!1+isset}"; }
......
24 27
# this is needed because aliases defined inside an if statement are not
25 28
# available inside that if statement
26 29

  
30
fi
27 31

  
32

  
28 33
if self_not_included "${BASH_SOURCE[0]}"; then
29 34

  
30 35

  
......
156 161
	echo "$path"
157 162
}
158 163

  
159
fi # load new aliases
160
if self_being_included; then
161

  
162 164
function echo_func ()
163 165
{
164 166
	inc_log_level

Also available in: Unified diff