Commit 904c0cf1 authored by Leo's avatar Leo

apkbuild-fixer: make remove_pkgname_from_source respect tarball name

- $pkgname-$pkgver.tar.gz::url won't have its $pkgname before ::
 replaced with the expanded variable name
parent 83982947
......@@ -75,6 +75,10 @@ remove_pkgname_from_source() {
[ -z "$1" ] || [ -z "$2" ] && return 0
for l in $2; do
sed -i "{$l s|\$pkgname|$pkgname|g }" "$1"
# The command above might replace the $pkgname in
# '$pkgname-$pkgver.tar.gz::' which should not be
# replaced, so re-add it if that is the case
sed -r -i "{$l s|$pkgname-\\\$pkgver(.*)::|\$pkgname-\$pkgver\1::|g }" "$1"
done
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment