summaryrefslogtreecommitdiff
path: root/moz-normalize-PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'moz-normalize-PKGBUILD')
-rwxr-xr-xmoz-normalize-PKGBUILD10
1 files changed, 8 insertions, 2 deletions
diff --git a/moz-normalize-PKGBUILD b/moz-normalize-PKGBUILD
index 930c47b..c254d19 100755
--- a/moz-normalize-PKGBUILD
+++ b/moz-normalize-PKGBUILD
@@ -54,7 +54,7 @@ sort-array() {
normalize() {
local file=$1
- for var in {make,check,opt,}depends arch license; do
+ for var in {make,check,}depends arch license; do
format-array "$var" "$file"
sort-array "$var" "$file"
done
@@ -63,7 +63,13 @@ normalize() {
sed -ri 's/\s+$//' "$file"
# generalize
- sed -i 's/firefox/$pkgbase/g' "$file"
+ sed -ri \
+ -e 's/([^=])firefox/\1$pkgbase/g' \
+ -e 's/\$pkgbase-(install-dir\.patch)/firefox-\1/g' \
+ "$file"
+ if ! grep -q pkgbase= "$file"; then
+ sed -i '/pkgdesc=/iif [[ -z $pkgbase ]]\; then pkgbase=$pkgname\; fi' "$file"
+ fi
}
main() {