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:
377eceb
)
added var function to print out variable values.
author
Fred T. Hamster
<fred@gruntose.com>
Wed, 12 Feb 2014 20:00:11 +0000
(15:00 -0500)
committer
Fred T. Hamster
<fred@gruntose.com>
Wed, 12 Feb 2014 20:00:11 +0000
(15:00 -0500)
scripts/core/functions.sh
patch
|
blob
|
history
diff --git
a/scripts/core/functions.sh
b/scripts/core/functions.sh
index 6d2bbe29aba4f4f15193e4e53505db6a2a4d26f0..bc2d1cabf88840ecfa0cb91401eb8e27e083f2de 100644
(file)
--- a/
scripts/core/functions.sh
+++ b/
scripts/core/functions.sh
@@
-33,6
+33,16
@@
if [ -z "$skip_all" ]; then
cd "$1"
}
+ # 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
+ }
+
function success_sound()
{
if [ ! -z "$CLAM_FINISH_SOUND" ]; then