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
153e9cb8
Commit
153e9cb8
authored
Feb 21, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add do_exclude list and test for it
parent
80b459f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
strings
share/eterbuild/functions/strings
+12
-0
test_list_exclude.sh
tests/test_list_exclude.sh
+17
-0
No files found.
share/eterbuild/functions/strings
0 → 100644
View file @
153e9cb8
# Args: LIST1 LIST2
# do_exclude_list print LIST2 with field contains in LIST1
do_exclude_list()
{
local i
local RES=
for i in $2 ; do
echo "$1" | grep -q -w $i || RES="$RES $i"
done
echo $RES
}
tests/test_list_exclude.sh
0 → 100755
View file @
153e9cb8
#!/bin/sh
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod strings
LIST1
=
"field1 field2"
LIST2
=
"field1 field2 field3 field4"
LIST3
=
"field"
check
()
{
[
"
$2
"
!=
"
$3
"
]
&&
echo
"FATAL with '
$1
': result '
$3
' do not match with '
$2
'"
||
echo
"OK for '
$1
' with '
$2
'"
}
check 1
"field3 field4"
"
`
do_exclude_list
"
$LIST1
"
"
$LIST2
"
`
"
check 2
""
"
`
do_exclude_list
"
$LIST2
"
"
$LIST1
"
`
"
check 3
"field"
"
`
do_exclude_list
"
$LIST1
"
"
$LIST3
"
`
"
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