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
4bbcefd9
Commit
4bbcefd9
authored
Dec 08, 2008
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up code (thanks Slava Semushin for comments)
parent
17e01c87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
common
share/eterbuild/functions/common
+6
-5
spec
share/eterbuild/functions/spec
+1
-1
No files found.
share/eterbuild/functions/common
View file @
4bbcefd9
...
@@ -7,7 +7,7 @@ set_eterbuilddir()
...
@@ -7,7 +7,7 @@ set_eterbuilddir()
{
{
[
-z
"
$ETERBUILDDIR
"
]
||
return
0
[
-z
"
$ETERBUILDDIR
"
]
||
return
0
if
dirname
$0
|
grep
/usr
>
/dev/null
;
then
if
dirname
$0
|
grep
"^/usr"
>
/dev/null
;
then
ETERBUILDETC
=
/etc/eterbuild
ETERBUILDETC
=
/etc/eterbuild
ETERBUILDDIR
=
/usr/share/eterbuild
ETERBUILDDIR
=
/usr/share/eterbuild
else
else
...
@@ -16,26 +16,27 @@ set_eterbuilddir()
...
@@ -16,26 +16,27 @@ set_eterbuilddir()
ETERBUILDETC
=
$(
realpath
`
dirname
$0
`
/../etc
)
ETERBUILDETC
=
$(
realpath
`
dirname
$0
`
/../etc
)
echo
"Note: run from source tree, datadir=
$ETERBUILDDIR
, sysconfdir=
$ETERBUILDETC
"
echo
"Note: run from source tree, datadir=
$ETERBUILDDIR
, sysconfdir=
$ETERBUILDETC
"
fi
fi
[
-n
"
$ETERBUILDDIR
"
]
test
-n
"
$ETERBUILDDIR
"
# returns test result
}
}
# set if empty and check it
# set if empty and check it
if
!
set_eterbuilddir
;
then
if
!
set_eterbuilddir
;
then
echo
"Can't detect package files location"
echo
"Can't detect package files location"
>
&2
exit
1
exit
1
fi
fi
#
#
fatal
()
fatal
()
{
{
echog
"Error:
$@
"
echog
"Error:
$@
"
>
&2
exit
1
exit
1
}
}
#
#
warning
()
warning
()
{
{
echog
"Warning:
$@
"
echog
"Warning:
$@
"
>
&2
}
}
print_list
()
print_list
()
...
...
share/eterbuild/functions/spec
View file @
4bbcefd9
...
@@ -41,7 +41,7 @@ get_txtrelease()
...
@@ -41,7 +41,7 @@ get_txtrelease()
# Obsoleted: get current release number
# Obsoleted: get current release number
get_release_number
()
get_release_number
()
{
{
echo
"Obsoleted get_release_number, use get_numrelease instead"
>
/dev/stderr
warning
"Obsoleted get_release_number, use get_numrelease instead"
get_numrelease
"
$1
"
get_numrelease
"
$1
"
}
}
...
...
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