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
a5f37180
Commit
a5f37180
authored
Feb 12, 2014
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgs: fix download URL with &
parent
d57e6310
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
rpmgs
bin/rpmgs
+5
-1
test_sed.sh
tests/test_sed.sh
+10
-0
No files found.
bin/rpmgs
View file @
a5f37180
...
...
@@ -72,7 +72,9 @@ get_archive1()
{
URL
=
${
GETSOURCE
/.bz2/
}
WEXT
=
`
basename
"
$URL
"
`
test
-f
"
$WEXT
.
$1
"
download_url
"
$URL
.
$1
"
||
return
[
-n
"
$FORCEDOWNLOAD
"
]
&&
docmd
rm
-f
"
$WEXT
.
$1
"
test
-f
"
$WEXT
.
$1
"
&&
echog
"
$WEXT
.
$1
already exists"
&&
return
download_url
"
$URL
.
$1
"
||
return
test
-f
"
$WEXT
.
$1
"
||
return
echog
-n
"Converting to
$WEXT
.bz2..."
}
...
...
@@ -225,6 +227,8 @@ function source_ext()
local
TMPSPEC
=
$1
.tmpurl
local
NEWSOURCE
=
$(
grep
"# Source
$3
-
$2
:"
"
$1
"
|
sed
-e
"s/.*
$2
:[
\t
]*//g"
)
test
-n
"
$NEWSOURCE
"
||
fatal
"Can't extract URL from
$Source$3
-
$2
"
# Fake replace for correct subst variables
NEWSOURCE
=
"
$(
echo
"
$NEWSOURCE
"
|
sed
-e
's|\&|\\&|g'
)
"
cat
$1
|
sed
-e
"s|^Summary:.*|Summary:
$NEWSOURCE
|g"
>
$TMPSPEC
GETSOURCEEXT
=
$(
eval_spec
"
$TMPSPEC
"
| get_var
"Summary"
)
rm
-f
"
$TMPSPEC
"
...
...
tests/test_sed.sh
0 → 100755
View file @
a5f37180
#!/bin/sh
check
()
{
[
"
$2
"
!=
"
$3
"
]
&&
echo
"FATAL with '
$1
': result '
$2
' do not match with '
$3
'"
||
echo
"OK for '
$1
' with '
$2
'"
}
RESTEXT
=
"Summary: test & test"
RT
=
"
$(
echo
"
$RESTEXT
"
|
sed
-e
's|\&|\\&|g'
)
"
check
"sed with &"
"
$(
echo
"Summary: test"
|
sed
-e
"s|Summary: .*|
$RT
|g"
)
"
"
$RESTEXT
"
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