projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acd81f8
)
made var function support multiple names.
author
Fred T. Hamster
<fred@gruntose.com>
Thu, 13 Feb 2014 19:48:45 +0000
(14:48 -0500)
committer
Fred T. Hamster
<fred@gruntose.com>
Thu, 13 Feb 2014 19:48:45 +0000
(14:48 -0500)
scripts/core/functions.sh
patch
|
blob
|
history
diff --git
a/scripts/core/functions.sh
b/scripts/core/functions.sh
index bc2d1cabf88840ecfa0cb91401eb8e27e083f2de..41d94b938e9144d29218e8fa31961b8a11f2a39f 100644
(file)
--- a/
scripts/core/functions.sh
+++ b/
scripts/core/functions.sh
@@
-35,12
+35,17
@@
if [ -z "$skip_all" ]; then
# displays the value of a variable in bash friendly format.
function var() {
- local varname="$1"; shift
- if [ -z "${!varname}" ]; then
- echo "$varname undefined"
- else
- echo "$varname=${!varname}"
- fi
+ while true; do
+ local varname="$1"; shift
+ if [ -z "$varname" ]; then
+ break
+ fi
+ if [ -z "${!varname}" ]; then
+ echo "$varname undefined"
+ else
+ echo "$varname=${!varname}"
+ fi
+ done
}
function success_sound()