Revision 8871
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/util.sh | ||
---|---|---|
32 | 32 |
for (( i=$#; i >= 1; i-- )); do printf '%q ' "${!i}"; done |
33 | 33 |
} |
34 | 34 |
|
35 |
#### strings |
|
36 |
|
|
37 |
sed_ere_flag="$(test "$(uname)" = Darwin && echo E || echo r)" |
|
38 |
|
|
39 |
sed () { echo_run env sed -"$sed_ere_flag" "$@";} |
|
40 |
|
|
41 | 35 |
#### verbose output |
42 | 36 |
|
43 | 37 |
: "${verbosity:=$verbose}" "${verbosity:=0}" |
... | ... | |
83 | 77 |
|
84 | 78 |
usage () { echo "Usage: $1" >&2; (exit 2); } |
85 | 79 |
|
80 |
#### strings |
|
81 |
|
|
82 |
sed_ere_flag="$(test "$(uname)" = Darwin && echo E || echo r)" |
|
83 |
|
|
84 |
sed () { echo_run env sed -"$sed_ere_flag" "$@";} |
|
85 |
|
|
86 | 86 |
#### vars |
87 | 87 |
|
88 | 88 |
set_var () { eval "$1"'="$2"'; } |
Also available in: Unified diff
lib/util.sh: moved strings after verbose output so strings commands can use verbose output aliases