[Pkg-mozext-commits] [jpm.sh] 25/43: New tool: jpm-optimize-signed-build.sh

Hema Prathaban hemaprathaban-guest at moszumanska.debian.org
Thu Aug 17 07:52:35 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 b18be10d1b6abe3827f303cdd796433c0ea489d6
Author: nord-stream <nord-stream at ochaken.jp.eu.org>
Date:   Tue Mar 15 11:08:28 2016 +0000

    New tool: jpm-optimize-signed-build.sh
---
 bin/jpm-optimize-signed-build.sh | 49 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/bin/jpm-optimize-signed-build.sh b/bin/jpm-optimize-signed-build.sh
new file mode 100755
index 0000000..12c2bc5
--- /dev/null
+++ b/bin/jpm-optimize-signed-build.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+# -*- sh; tab-width: 4; coding: utf-8 -*-
+# vim: ts=4 noet ai ft=sh
+
+# The state-of-the-art optimization against a signed Firefox add-on without
+# breaking the signature.
+#
+# This file is part of JPM.sh.
+# Copyright (C) 2016 the Desktopd developers
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+
+# JPM.sh directories
+gBinDir=`dirname "$0"`
+gBinDir=`cd "$gBinDir" ; pwd`
+gLibDir=${gBinDir}/../lib
+gDepsDir=${gBinDir}/../deps
+
+
+# Include needed scripts
+. "$gLibDir/console.sh"
+
+[ -f "$1" ] || {
+	jpmConsoleError "No such file: $1"
+	exit 1
+}
+
+which advzip >/dev/null 2>&1 && {
+	jpmConsoleNotice "Recompressing the archive with 'advzip'..."
+	
+	# Insanely slow `deflate` compression
+	advzip -k -z -4 -i 2000 "$1"
+:;} || {
+	jpmConsoleError "Required but not found: advzip (AdvanceCOMP)"
+	exit 1
+}
+

-- 
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