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
daebbb20
Commit
daebbb20
authored
Jun 15, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce rhas (echo | egrep -q) and test it
parent
a117d733
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
strings
share/eterbuild/functions/strings
+7
-0
test_prevprelease.sh
tests/test_prevprelease.sh
+7
-1
No files found.
share/eterbuild/functions/strings
View file @
daebbb20
...
@@ -47,6 +47,13 @@ estrlist()
...
@@ -47,6 +47,13 @@ estrlist()
$ETERBUILDBIN
/estrlist
"
$@
"
$ETERBUILDBIN
/estrlist
"
$@
"
}
}
# CHECKME: the same like estrlist has ?
# Note: used egrep! write '[0-9]+(first|two)', not '[0-9]\+...'
rhas
()
{
echo
"
$1
"
| egrep
-q
"
$2
"
}
# drop listed options
# drop listed options
# FIXME: do not handle args like -Uh, only -U -h separately
# FIXME: do not handle args like -Uh, only -U -h separately
...
...
tests/test_prevprelease.sh
View file @
daebbb20
#!/bin/sh
#!/bin/sh
.
`
dirname
$0
`
/../share/eterbuild/functions/common
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod spec
load_mod spec
strings
SPECNAME
=
get_ver.spec
SPECNAME
=
get_ver.spec
...
@@ -37,6 +37,10 @@ check_prev()
...
@@ -37,6 +37,10 @@ check_prev()
test
-n
"
$BASERELEASE
"
||
fatal
"baserelease missed"
test
-n
"
$BASERELEASE
"
||
fatal
"baserelease missed"
local
RES
=
"
$(
get_txtrelease
$SPECNAME
)$(
decrement_release
$BASERELEASE
)
.
$MDISTR
.
$BASERELEASE
"
local
RES
=
"
$(
get_txtrelease
$SPECNAME
)$(
decrement_release
$BASERELEASE
)
.
$MDISTR
.
$BASERELEASE
"
check
"
$2
"
"
$1
"
"
$RES
"
check
"
$2
"
"
$1
"
"
$RES
"
#[ -z "${RES/*alt[0-9]*.M40.[0-9]*/}" ] || echo "breaks rule, see the code"
rhas
"
$RES
"
"alt[0-9]+
\.
M40
\.
[0-9]+"
||
echo
"breaks rule 1, see the code"
rhas
"
$1
"
"(alt|eter)[0-9]+
\.
M40
\.
[0-9]+"
||
echo
"breaks rule 2, see the code"
}
}
MDISTR
=
M40
MDISTR
=
M40
...
@@ -44,5 +48,7 @@ check_prev alt2.M40.3 alt3
...
@@ -44,5 +48,7 @@ check_prev alt2.M40.3 alt3
check_prev alt2.M40.3.r201.2 alt3.r201.2
check_prev alt2.M40.3.r201.2 alt3.r201.2
check_prev alt0.M40.1 alt1
check_prev alt0.M40.1 alt1
check_prev alt0.M40.0 alt0
check_prev alt0.M40.0 alt0
check_prev alt50.M40.51 alt51
check_prev eter50.M40.51 eter51
#rm -f $SPECNAME
#rm -f $SPECNAME
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