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
77e27e34
Commit
77e27e34
authored
Jul 09, 2009
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add get_tarballname and use it
parent
f0002713
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
spec
share/eterbuild/functions/spec
+6
-0
get_tarballname.sh
tests/get_tarballname.sh
+34
-0
No files found.
share/eterbuild/functions/spec
View file @
77e27e34
...
...
@@ -84,6 +84,12 @@ get_version()
eval_spec
$1
| get_var
"Version"
}
get_tarballname
()
{
local
SOURCE
=
$(
eval_spec
$1
| get_var
"Source
$2
"
)
basename
$SOURCE
|
sed
-e
"s|-
$(
get_version
$1
)
.*||g"
}
# Set version for spec (args: spec version), f.i. test.spec 1.2.3)
# Supports %major and %ver_major macros in spec
...
...
tests/get_tarballname.sh
0 → 100755
View file @
77e27e34
#!/bin/sh
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod spec
SPEC
=
get_ver.spec
check_get_version
()
{
RES
=
$1
cat
<<
EOF
>
$SPEC
Name: get_version_test
Release: alt1
Version:
$TESTVER
Source: %name-%version.tar.bz2
Summary: Test
Group: Other
License: Public License
%define major 1.0
%define ver 10
%define maj 1.0
%description
Get version test
EOF
RESGET
=
`
get_tarballname
$SPEC
`
[
"
$RES
"
!=
"
$RESGET
"
]
&&
echo
"FATAL with 'get_tarballname': result '
$RES
' do not match with '
$RESGET
'"
||
echo
"OK for 'get_tarballname' with '
$RESGET
'"
}
TESTVER
=
1.0.10
check_get_version get_version_test
rm
-f
$SPEC
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