Project

General

Profile

« Previous | Next » 

Revision 9227

lib/sh/util.sh: added unexport() (note that `declare +x` won't work because it defines the var if it isn't set)

View differences:

lib/sh/util.sh
45 45
# usage: local var=...; local_inv
46 46
alias local_inv='declare "no_$var=$(test "${!var}" || echo 1)"'
47 47

  
48
unexport() { export -n "$@"; }
49
	# `declare +x` won't work because it defines the var if it isn't set
50

  
48 51
get_prefix_vars() { : "${prefix:?}"; eval echo '${!'$prefix'*}'; }
49 52

  
50 53
# usage: local prefix=..._; import_vars

Also available in: Unified diff