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
fb1f7bec
Commit
fb1f7bec
authored
Feb 19, 2011
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common: move function before used
parent
000dd781
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
25 deletions
+32
-25
common
share/eterbuild/functions/common
+32
-25
No files found.
share/eterbuild/functions/common
View file @
fb1f7bec
...
...
@@ -5,6 +5,33 @@
# $1 - needed VERSION of etersoft-build-utils. f.i. 162
# for systems without realpath command
realpath
()
{
readlink
-f
"
$@
"
}
# Выводит указанное сообщение об ошибке и завершает программу
fatal
()
{
if
[
-z
"
$TEXTDOMAIN
"
]
;
then
echo
"Error in
$0
:
$@
"
>
&2
else
echog
"Error in
$0
:
$@
"
>
&2
fi
exit
1
}
# Выводит указанное сообщение
warning
()
{
if
[
-z
"
$TEXTDOMAIN
"
]
;
then
echo
"Warning in
$0
:
$@
"
>
&2
else
echog
"Warning in
$0
:
$@
"
>
&2
fi
}
set_eterbuilddir
()
{
[
-z
"
$ETERBUILDDIR
"
]
||
return
0
...
...
@@ -34,6 +61,11 @@ set_eterbuilddir()
# returns test result
}
# check for needed commands
#for i in distr_vendor realpath ; do
# which $i >/dev/null || fatal
#done
# set if empty and check it
if
!
set_eterbuilddir
;
then
echo
"Can't detect package files location"
>
&2
...
...
@@ -43,27 +75,6 @@ fi
DISTRVENDOR
=
$(
realpath
$ATOPDIR
/../rpm-build-altlinux-compat/bin/distr_vendor 2>/dev/null
)
[
-x
"
$DISTRVENDOR
"
]
||
DISTRVENDOR
=
distr_vendor
# Выводит указанное сообщение об ошибке и завершает программу
fatal
()
{
if
[
-z
"
$TEXTDOMAIN
"
]
;
then
echo
"Error in
$0
:
$@
"
>
&2
else
echog
"Error in
$0
:
$@
"
>
&2
fi
exit
1
}
# Выводит указанное сообщение
warning
()
{
if
[
-z
"
$TEXTDOMAIN
"
]
;
then
echo
"Warning in
$0
:
$@
"
>
&2
else
echog
"Warning in
$0
:
$@
"
>
&2
fi
}
print_list
()
{
local
i
...
...
@@ -72,10 +83,6 @@ print_list()
done
}
realpath
()
{
readlink
-f
"
$@
"
}
get_root_git_dir
()
{
...
...
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