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
ad9093f6
Commit
ad9093f6
authored
Feb 22, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move string functions to strings module
parent
153e9cb8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
25 deletions
+25
-25
common
share/eterbuild/functions/common
+1
-24
strings
share/eterbuild/functions/strings
+24
-1
No files found.
share/eterbuild/functions/common
View file @
ad9093f6
...
...
@@ -97,7 +97,7 @@ load_mod()
done
}
load_mod config gettext alt spec
load_mod config gettext alt spec
strings
# check for needed version
if
[
-n
"
$NEEDETERBUILD
"
]
;
then
...
...
@@ -107,29 +107,6 @@ if [ -n "$NEEDETERBUILD" ] ; then
fi
fi
filter_strip_spaces
()
{
sed
-e
"s|^ ||"
|
sed
-e
"s|
\$
||"
}
strip_spaces
()
{
echo
$@
| filter_strip_spaces
}
# 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
detect_target_env
()
{
...
...
share/eterbuild/functions/strings
View file @
ad9093f6
filter_strip_spaces()
{
sed -e "s| \+| |g" | \
sed -e "s|^ ||" | sed -e "s| \$||"
}
strip_spaces()
{
echo $@ | filter_strip_spaces
}
# Args: LIST1 LIST2
# do_exclude_list print LIST2 with field contains in LIST1
do_exclude_list()
...
...
@@ -8,5 +19,17 @@ do_exclude_list()
for i in $2 ; do
echo "$1" | grep -q -w $i || RES="$RES $i"
done
echo $RES
echo $RES | filter_strip_spaces
}
# 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"
}
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