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
3d815318
Commit
3d815318
authored
Sep 04, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gear: fix tar_dir_from_rules
parent
ca61545b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
gear
share/eterbuild/functions/gear
+7
-1
No files found.
share/eterbuild/functions/gear
View file @
3d815318
...
...
@@ -50,10 +50,16 @@ get_tardir_from_rules()
local tar
=
"
$1
"
local
tarname
=
"
$2
"
local
packname
=
"
$(
basename
"
$tarname
"
.
$tar
)
"
# FIXME: hack (drop version)
local
packnamewov
=
"
$(
echo
$packname
|
sed
-e
"s|-[0-9].*||"
)
"
local dir
assert_var
tar
packname
# firstly try get dir by name=
dir
=
$(
print_gear_rules |
grep
"
$tar
*:"
| egrep
"name=
$packname
([[:space:]]|
$)
"
|
sed
-e
"s|
$tar
*: *||g"
|
sed
-e
"s| .*||g"
|
head
-n1
)
dir
=
$(
print_gear_rules |
grep
"
$tar
*:"
| egrep
"name=
$packname
([[:space:]]|
$)
"
|
sed
-e
"s|
$tar
*: *||g"
|
sed
-e
"s| .*||g"
|
head
-n1
)
#"
# if can't get by name, try get by name from rule without name=
if
[
-z
"
$dir
"
]
;
then
dir
=
$(
print_gear_rules | egrep
"
$tar
*: *
$packnamewov
([[:space:]]|
$)
"
|
sed
-e
"s|
$tar
*: *||g"
|
sed
-e
"s| .*||g"
|
head
-n1
)
#"
fi
# if can't get by name, use first rule without name=
if
[
-z
"
$dir
"
]
;
then
dir
=
$(
print_gear_rules |
grep
"
$tar
*:"
|
grep
-v
"name="
|
sed
-e
"s|
$tar
*: *||g"
|
sed
-e
"s| .*||g"
|
head
-n1
)
...
...
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