[Pkg-mozext-commits] [jpm.sh] 33/43: Improved debug code remover
Hema Prathaban
hemaprathaban-guest at moszumanska.debian.org
Thu Aug 17 07:52:36 UTC 2017
This is an automated email from the git hooks/post-receive script.
hemaprathaban-guest pushed a commit to branch master
in repository jpm.sh.
commit 85c663d969d1878eb8a0f98e1ed2779a99d03d69
Author: nord-stream <nord-stream at ochaken.jp.eu.org>
Date: Sun Mar 20 12:32:23 2016 +0000
Improved debug code remover
---
lib/xpi.sh | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/lib/xpi.sh b/lib/xpi.sh
index 5ed427a..57d5354 100644
--- a/lib/xpi.sh
+++ b/lib/xpi.sh
@@ -93,8 +93,13 @@ jpmXpiBuild () (
jpmConsoleLog "xpi-build: Excluding development files..."
rm -fr "$buildDir/debug.js" "$buildDir/data/debug" >&2
- preprocess_sed='s,^\s*/\*!_DEBUGONLY_!.*,,'
- find "$buildDir" -name '*.js' -exec \
+ preprocess_sed_html='s,^\s*<!--!_DEBUGONLY_!.*-->\s*,,'
+ find "$buildDir" \( -name '*.html' -or -name '*.xhtml' \) -exec \
+ sh -c 'sed "$1" < "$2" > "$2.tmp" && mv -f "$2.tmp" "$2"' \
+ -- "$preprocess_sed_html" {} \;
+
+ preprocess_sed='s,^\s*/\*!_DEBUGONLY_!.*\*/.*,,'
+ find "$buildDir" \( -name '*.js' -or -name '*.css' \) -exec \
sh -c 'sed "$1" < "$2" > "$2.tmp" && mv -f "$2.tmp" "$2"' \
-- "$preprocess_sed" {} \;
@@ -243,9 +248,9 @@ jpmXpiGenInstallRdf () {
<em:bootstrap>true</em:bootstrap>
<em:unpack>`jpmToBoolValue "${addon_unpack}"`</em:unpack>
<em:version>`jpmXmlEscapeArg "$2"`</em:version>
-<em:name>${addon_name}</em:name>
-<em:description>${addon_description}</em:description>
-<em:creator>${addon_author}</em:creator>
+<em:name>`jpmXmlEscapeArg "${addon_name}"`</em:name>
+<em:description>`jpmXmlEscapeArg "${addon_description}"`</em:description>
+<em:creator>`jpmXmlEscapeArg "${addon_author}"`</em:creator>
<em:optionsURL>data:text/xml,<placeholder/></em:optionsURL>
<em:optionsType>2</em:optionsType>
<em:multiprocessCompatible>true</em:multiprocessCompatible>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/jpm.sh.git
More information about the Pkg-mozext-commits
mailing list