diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-29 17:29:50 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-01-08 15:04:27 -0500 |
commit | e589d617513767c99eb5e35f6fcdf74d6ed6b4fb (patch) | |
tree | 167813f7f23255c20c89b8743a89e7c9a15e8713 /moz-normalize-PKGBUILD | |
parent | f9d4a992d0fa722b53a269532456b8b41fe428bf (diff) |
fix up both scripts
Diffstat (limited to 'moz-normalize-PKGBUILD')
-rwxr-xr-x | moz-normalize-PKGBUILD | 10 |
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() { |