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
918825fc
Commit
918825fc
authored
Feb 18, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename get_gear_rules to get_gear_rules_by_spec and introduce new get_gear_rules, fix get_gear_spec
parent
6524dd52
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
16 deletions
+28
-16
build
share/eterbuild/functions/build
+4
-4
buildsrpm
share/eterbuild/functions/buildsrpm
+1
-1
common
share/eterbuild/functions/common
+14
-5
spec
share/eterbuild/functions/spec
+9
-6
No files found.
share/eterbuild/functions/build
View file @
918825fc
...
...
@@ -3,8 +3,8 @@
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
get_gear_rules
()
# TODO: move to gear file
get_gear_rules
_by_spec
()
{
local
SPECNAME
=
"
$1
"
# FIXME: move get rules file to separate function
...
...
@@ -59,7 +59,7 @@ uni_rpmbuild()
shift
# skip spec name
# FIXME: use spec name as project name
GEARRULES
=
$(
get_gear_rules
"
$SPECNAME
"
)
GEARRULES
=
$(
get_gear_rules
_by_spec
"
$SPECNAME
"
)
# build package without MENV checking
if
true
||
[
"
$MENV
"
=
"SS"
]
;
then
...
...
@@ -92,7 +92,7 @@ uni_buildreq()
if
is_gear
$SPECDIR
;
then
# FIXME: use spec name as project name
GEARRULES
=
$(
get_gear_rules
"
$SPECNAME
"
)
GEARRULES
=
$(
get_gear_rules
_by_spec
"
$SPECNAME
"
)
docmd
$NICE
$GEARBUILDREQ
$BUILDREQPARAM
$GEARRULES
--commit
--
"
$SPECNAME
"
"
$@
"
||
RET
=
$?
else
...
...
share/eterbuild/functions/buildsrpm
View file @
918825fc
...
...
@@ -36,7 +36,7 @@ uni_rpmbuildsrpm()
shift
# skip spec name
# FIXME: use spec name as project name
GEARRULES
=
$(
get_gear_rules
"
$SPECNAME
"
)
GEARRULES
=
$(
get_gear_rules
_by_spec
"
$SPECNAME
"
)
# build package without MENV checking
if
true
||
[
"
$MENV
"
=
"SS"
]
;
then
...
...
share/eterbuild/functions/common
View file @
918825fc
...
...
@@ -128,8 +128,9 @@ get_root_git_dir()
readlink
-f
"
$DIR
"
2>/dev/null
||
realpath
"
$DIR
"
}
# Usage: is_gear [path_to_spec|dir_inside_git]
is_gear
()
# TODO: move to separate gear file
# TODO: rewrite with get_gear_rules_by_spec in mind
get_gear_rules
()
{
local
DIR
=
"
$1
"
[
-z
"
$IGNOREGEAR
"
]
||
return
1
...
...
@@ -137,9 +138,17 @@ is_gear()
[
-n
"
$DIR
"
]
&&
cd
$DIR
local
GITDIR
=
$(
get_root_git_dir
)
[
-n
"
$DIR
"
]
&&
cd
-
>
/dev/null
[
-d
"
$GITDIR
/.gear"
]
&&
return
0
[
-r
"
$GITDIR
/.gear-rules"
]
&&
return
0
return
1
local
rules
=
"
$GITDIR
/.gear/rules"
[
-r
"
$rules
"
]
||
rules
=
"
$GITDIR
/.gear-rules"
[
-r
"
$rules
"
]
||
return
echo
$rules
}
# Usage: is_gear [path_to_spec|dir_inside_git]
is_gear
()
{
get_gear_rules
$@
>
/dev/null
}
filter_gear_name
()
...
...
share/eterbuild/functions/spec
View file @
918825fc
...
...
@@ -218,21 +218,24 @@ set_specdir()
fi
}
# internal func
get_gear_rule_spec
()
{
local
SPEC
=
"
$(
grep
"^spec:"
$(
get_root_git_dir
)
/.gear/rules 2>/dev/null |
cut
-d
" "
-f2
)
"
local
rules
=
$(
get_gear_rules
)
[
-r
"
$rules
"
]
||
return
local
SPEC
=
"
$(
grep
"^spec:"
$rules
2>/dev/null |
cut
-d
" "
-f2
)
"
test
-r
"
$(
get_root_git_dir
)
/
$SPEC
"
&&
echo
$(
get_root_git_dir
)
/
$SPEC
}
# search for gear spec
get_gear_spec
()
{
local
trySpec
=
""
# check locally only if in gear repo
is_gear
&&
trySpec
=
$(
echo
*
.spec
)
# if not in local dir, check spec in git root dir
local
trySpec
trySpec
=
$(
get_gear_rule_spec
)
# check spec in git root dir (by default)
[
-f
"
$trySpec
"
]
||
trySpec
=
`
echo
$(
get_root_git_dir
)
/
*
.spec
`
[
-f
"
$trySpec
"
]
||
trySpec
=
$(
get_gear_rule_spec
)
# check locally only if in gear repo
#is_gear && trySpec=$(echo *.spec)
# printout nothing if can't get spec
[
-f
"
$trySpec
"
]
||
trySpec
=
""
echo
$trySpec
...
...
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