Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Pmodules
buildblocks
Commits
be7b0ba7
Commit
be7b0ba7
authored
Sep 04, 2014
by
gsell
Browse files
lib.bash: info() and debug() added
parent
0bf0df96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
lib/lib.bash
lib/lib.bash
+14
-4
No files found.
lib/lib.bash
View file @
be7b0ba7
...
...
@@ -44,7 +44,20 @@ log() {
local
-ri
fd
=
$1
local
-r
fmt
=
"
$2
\n
"
shift
2
printf
"
$fmt
"
"
$@
"
>>
/dev/fd/
$fd
printf
--
"
$fmt
"
"
$@
"
>>
/dev/fd/
$fd
}
info
()
{
log 1
"
$1
\n
"
"
${
@
:2
}
"
}
error
()
{
log 2
"
$1
\n
"
"
${
@
:2
}
"
}
debug
()
{
[[
${
EM_DEBUG
}
]]
||
return
0
log
"
$@
"
}
die
()
{
...
...
@@ -81,6 +94,3 @@ append_path () {
fi
}
error
()
{
printf
"
$1
\n
"
"
${
@
:2
}
"
1>&2
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment