Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
7f719a83
Commit
7f719a83
authored
Dec 06, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common: add print_message and use it in fatal and warning. Print only script…
common: add print_message and use it in fatal and warning. Print only script name, not absolute path
parent
92e8649c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
common
share/eterbuild/functions/common
+12
-9
No files found.
share/eterbuild/functions/common
View file @
7f719a83
...
...
@@ -11,25 +11,28 @@ realpath()
readlink
-f
"
$@
"
}
# Print error message and stop the program
fatal
()
print_message
()
{
local
DESC
=
"
$1
"
shift
if
[
-z
"
$TEXTDOMAIN
"
]
;
then
echo
"
Error in
$0
:
$@
"
>
&2
echo
"
$DESC
in
$(
basename
$0
)
:
$@
"
>
&2
else
echog
"
Error in
$0
:
$@
"
>
&2
echog
"
$DESC
in
$(
basename
$0
)
:
$@
"
>
&2
fi
}
# Print error message and stop the program
fatal
()
{
print_message Error
"
$@
"
exit
1
}
# Just print warning message
warning
()
{
if
[
-z
"
$TEXTDOMAIN
"
]
;
then
echo
"Warning in
$0
:
$@
"
>
&2
else
echog
"Warning in
$0
:
$@
"
>
&2
fi
print_message Warning
"
$@
"
}
...
...
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