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
74342b0f
Commit
74342b0f
authored
Feb 21, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce drop_args function with test, use it in rpmbsh
parent
58178235
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
1 deletion
+30
-1
rpmbsh
bin/rpmbsh
+1
-1
common
share/eterbuild/functions/common
+12
-0
test_drop_args.sh
tests/test_drop_args.sh
+17
-0
No files found.
bin/rpmbsh
View file @
74342b0f
...
...
@@ -78,7 +78,7 @@ add_changelog_helper "- new version" $LISTNAMES
# We do not not pass args for myhsh here...
# FIXME: не обрабатывает два пропускаемых вместе параметра
pack_src_rpm
$COMMIT
$(
echo
$LISTRPMARGS
|
sed
-e
"s|-[suUicl]||g"
)
pack_src_rpm
$COMMIT
$(
drop_args
"
$LISTRPMARGS
"
s u U i c l
)
# TODO: skip for prev. packed src.rpm
set_specdir
$LISTNAMES
...
...
share/eterbuild/functions/common
View file @
74342b0f
...
...
@@ -107,6 +107,18 @@ if [ -n "$NEEDETERBUILD" ] ; then
fi
fi
# drop listed options
# FIXME: do not handle args like -Uh, only -U -h separately
drop_args
()
{
local
ARGS
=
"
$1
"
shift
local
LISTIGNORE
=
"
$@
"
echo
"
$ARGS
"
|
sed
-e
"s|-[
${
LISTIGNORE
/ /
}
]||g"
|
sed
-e
"s|
\+
| |g"
| filter_strip_spaces
#echo "$ARGS" | \
# ( for i in $LISTIGNORE ; do sed -e "s|-$i||g" ; done ) #| sed -e "s| +| |g"
}
# Internal
# Определяет, для какой среды собирать: по ключу -M23 -M24 или по каталогу, в котором спек
...
...
tests/test_drop_args.sh
0 → 100755
View file @
74342b0f
#!/bin/sh
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod git
check
()
{
[
"
$2
"
!=
"
$3
"
]
&&
echo
"FATAL with '
$1
': result '
$3
' do not match with '
$2
'"
||
echo
"OK for '
$1
' with '
$2
'"
}
check 1
"-h"
"
$(
drop_args
"-h -U"
U
)
"
check 2
"-h"
"
$(
drop_args
" -h -U "
U
)
"
check 3
"-U"
"
$(
drop_args
" -h -U "
h
)
"
check 4
"-U -i"
"
$(
drop_args
" -h -U -i"
h
)
"
check 5
""
"
$(
drop_args
" -h -U "
h U
)
"
check 6
""
"
$(
drop_args
" -h -U "
U h
)
"
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