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
dba04464
Commit
dba04464
authored
Mar 07, 2009
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce get_altdistr_version (M50 -> 5.0) and get_altdistr_mod (5.0 -> M50)…
introduce get_altdistr_version (M50 -> 5.0) and get_altdistr_mod (5.0 -> M50) funcs, add tests for it
parent
1254c877
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
common
share/eterbuild/functions/common
+11
-0
transf_altdistrversion.sh
tests/transf_altdistrversion.sh
+35
-0
No files found.
share/eterbuild/functions/common
View file @
dba04464
...
...
@@ -165,3 +165,14 @@ make_temp_file()
fi
}
# M50 -> 5.0
get_altdistr_version
()
{
echo
"
$1
"
|
sed
-e
"s|M
\(
[0-9]
\)\(
[0-9]
\)
|
\1\.\2
|g"
|
sed
-e
"s|SS|Sisyphus|g"
}
# 5.0 -> M50
get_altdistr_mod
()
{
echo
"
$1
"
|
sed
-e
"s|
\(
[0-9]
\)\.\(
[0-9]
\)
|M
\1\2
|g"
|
sed
-e
"s|Sisyphus|SS|g"
}
tests/transf_altdistrversion.sh
0 → 100755
View file @
dba04464
#!/bin/sh
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod spec
check
()
{
[
"
$2
"
!=
"
$3
"
]
&&
echo
"FATAL with '
$1
': result '
$2
' do not match with '
$3
'"
||
echo
"OK for '
$1
' with '
$2
'"
}
check_AD
()
{
check
$1
$2
`
get_altdistr_version
$1
`
}
check_MOD
()
{
check
$1
$2
`
get_altdistr_mod
$1
`
}
echo
"Check get_altdistr_version"
check_AD M40 4.0
check_AD M30 3.0
check_AD M41 4.1
check_AD M50 5.0
check_AD SS Sisyphus
echo
"Check get_altdist_mod"
check_MOD 2.4 M24
check_MOD 3.0 M30
check_MOD 4.0 M40
check_MOD 4.1 M41
check_MOD 5.0 M50
check_MOD Sisyphus SS
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