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
ddbdb98a
Commit
ddbdb98a
authored
Jan 17, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmbph: add bash->dash translation
parent
adb9b244
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
rpmbph
bin/rpmbph
+24
-4
No files found.
bin/rpmbph
View file @
ddbdb98a
...
...
@@ -14,6 +14,25 @@
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod repl rpm git buildsrpm
# for rpm + (d)ash
remove_bashism
()
{
local
SPECNAME
=
$1
subst
"s|^pushd
\(
.*
\)
|cd
\1
>/dev/null|g"
$SPECNAME
subst
"s|^popd|cd - >/dev/null|g"
$SPECNAME
# {1,2} translation
# FIXME: miss first spaces
while
read
-r
n
;
do
echo
"
$n
"
|
grep
-v
"{.*}"
&&
continue
eval echo
"
$n
"
done
<
$SPECNAME
>
$SPECNAME
.tmp
[
-e
"
$SPECNAME
.tmp"
]
&&
mv
-f
$SPECNAME
.tmp
$SPECNAME
checkbashisms
$SPECNAME
}
altspec_to_local
()
{
local
i
...
...
@@ -236,10 +255,11 @@ if [ "$PKGVENDOR" = "alt" ] ; then
subst
"s|^
\(
Auto[RP].*
\)
,nomingw32|
\1
|g"
$SPECNAME
subst
"s|^
\(
Auto[RP].*
\)
, nomingw32|
\1
|g"
$SPECNAME
fi
else
# for systems with ash as sh (f.i., Ubuntu)
subst
"s|^pushd
\(
.*
\)
|cd
\1
>/dev/null|g"
$SPECNAME
subst
"s|^popd|cd - >/dev/null|g"
$SPECNAME
fi
if
[
"
$PKGVENDOR
"
=
"ubuntu"
]
||
[
"
$PKGVENDOR
"
=
"debian"
]
;
then
# for systems with (d)ash as sh (f.i., Ubuntu)
remove_bashism
$SPECNAME
fi
if
[
"
$DISTRNAME
/
$DISTRVERSION
"
=
"CentOS/5"
]
;
then
...
...
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