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
552b26e4
Commit
552b26e4
authored
Sep 22, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix remove_bashism for minimalize intrusion
parent
e139fa0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
spec
share/eterbuild/functions/spec
+4
-1
test_remove_bashism.sh
tests/test_remove_bashism.sh
+2
-0
No files found.
share/eterbuild/functions/spec
View file @
552b26e4
...
...
@@ -257,6 +257,7 @@ separate_changelog()
}
# for rpm + (d)ash
# http://mywiki.wooledge.org/Bashism
remove_bashism
()
{
local
SPECNAME
=
"
$1
"
...
...
@@ -271,7 +272,9 @@ remove_bashism()
# FIXME: miss first spaces
while
read
-r
n
;
do
echo
"
$n
"
|
grep
-v
"{.*}"
&&
continue
eval echo
"
$n
"
rs
=
"
$(
echo
"
$n
"
| perl
-pe
"s|.*
\s
(.*?{.*?}.*?)
\s
.*|
\1
|g"
)
"
res
=
$(
eval echo
"
$rs
"
)
echo
"
$n
"
| perl
-pe
"s|
$rs
|
$res
|g"
done
<
$SPECNAME
.main
>
$SPECNAME
.tmp
[
-s
"
$SPECNAME
.tmp"
]
&&
mv
-f
$SPECNAME
.tmp
$SPECNAME
checkbashisms
$SPECNAME
...
...
tests/test_remove_bashism.sh
View file @
552b26e4
...
...
@@ -21,6 +21,8 @@ License: Public License
%build
pushd txt
echo {1,2}text
%__subst "s|1|2|g" text/{1,eweew}
%__subst "s|1re er| erer2|g" text/{1,eweew} nono
popd
%description
...
...
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