summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/mv_mozextension-r1.eclass')
-rw-r--r--eclass/mv_mozextension-r1.eclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/eclass/mv_mozextension-r1.eclass b/eclass/mv_mozextension-r1.eclass
index 1f25a6a4..7062cd3a 100644
--- a/eclass/mv_mozextension-r1.eclass
+++ b/eclass/mv_mozextension-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 2017 Gentoo Foundation
+# Copyright 2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mv_mozextension-r1.eclass
@@ -356,9 +356,10 @@ moz_getid() {
res=$(sed -n -e '/install-manifest/,$ '"${sub}" -- "${file}") || res=
else file=${dir}/manifest.json
test -f "${file}" || die "cannot find ${dir}/{install.rdf,manifest.json}"
- sub='^[[:space:]]*["'\''][iI][dD]["'\''][[:space:]]*:[[:space:]]*'
- sub=${sub}'["'\'']\(.*\)["'\''][[:space:]]*,\?[[:space:]]*$/\1'
- res=$(sed -n -e "s/${sub}/p" -- "${file}") || res=
+ sub='/^[[:space:]]*["'\'']gecko["'\''][[:space:]]*:/,/\}/s/'
+ sub=${sub}'^[[:space:]]*["'\'']id["'\''][[:space:]]*:[[:space:]]*'
+ sub=${sub}'["'\'']\(.*\)["'\''][[:space:]]*,\?[[:space:]]*$/\1/p'
+ res=$(sed -n -e "${sub}" -- "${file}") || res=
fi
[ -n "${res}" ] || die "failed to determine id from ${file}"
eval ${var}=\${res}