[Pkg-mozext-commits] [jpm.sh] 29/43: Allow rebranding the string 'Firefox'

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 3fdd7e2d56def0a1764b1f881fd54de9ce379d36
Author: nord-stream <nord-stream at ochaken.jp.eu.org>
Date:   Thu Mar 17 04:22:33 2016 +0000

    Allow rebranding the string 'Firefox'
---
 bin/jpm-build.sh |  6 ++++++
 bin/jpm-run.sh   | 12 +++++++++---
 lib/runner.sh    |  4 ++--
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/bin/jpm-build.sh b/bin/jpm-build.sh
index 9d2e4be..ee410e5 100755
--- a/bin/jpm-build.sh
+++ b/bin/jpm-build.sh
@@ -20,6 +20,12 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 
+# Global branding switch
+[ "$JPM_SH_BROWSER_NAME" ] && gBrowserName=$JPM_SH_BROWSER_NAME \
+	|| gBrowserName='Firefox'
+[ "$JPM_SH_BROWSER_BIN" ] && gBrowserBinName=$JPM_SH_BROWSER_BIN \
+	|| gBrowserBinName=firefox
+
 # Command line arguments
 # May be empty
 printPackageName=$1
diff --git a/bin/jpm-run.sh b/bin/jpm-run.sh
index 720e7d6..81510d6 100755
--- a/bin/jpm-run.sh
+++ b/bin/jpm-run.sh
@@ -20,12 +20,18 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 
+# Global branding switch
+[ "$JPM_SH_BROWSER_NAME" ] && gBrowserName=$JPM_SH_BROWSER_NAME \
+	|| gBrowserName='Firefox'
+[ "$JPM_SH_BROWSER_BIN" ] && gBrowserBinName=$JPM_SH_BROWSER_BIN \
+	|| gBrowserBinName=firefox
+
 # Command line arguments
 # May be empty
 firefoxBinPath=$1
 [ -x "$firefoxBinPath" ] && [ -f "$firefoxBinPath" ] || {
-	which firefox >/dev/null && firefoxBinPath=`which firefox` || {
-		jpmConsoleError "Firefox binary not found. Please specify a correct path."
+	which "$gBrowserBinName" >/dev/null && firefoxBinPath=`which "$gBrowserBinName"` || {
+		jpmConsoleError "$gBrowserName binary not found. Please specify a correct path."
 		exit 1
 	}
 }
@@ -64,7 +70,7 @@ xpiId=`jpmXpiGetId`
 # Debug build
 isProdBuild=''
 
-jpmConsoleNotice "Building .xpi and launching Firefox..."
+jpmConsoleNotice "Building .xpi and launching ${gBrowserName}..."
 jpmXpiBuild "$isProdBuild" | jpmFirefoxStart "$firefoxBinPath" "$xpiId"
 
 jpmConsoleNotice "Done: jpm-run.sh"
diff --git a/lib/runner.sh b/lib/runner.sh
index 39d1d32..cdec5ab 100644
--- a/lib/runner.sh
+++ b/lib/runner.sh
@@ -161,13 +161,13 @@ jpmFirefoxStart () (
 		cat > "$extDir/$aXpiId.xpi"
 	}
 	
-	jpmConsoleLog "runner: Profile set up. Starting Firefox..."
+	jpmConsoleLog "runner: Profile set up. Starting $gBrowserName..."
 	
 	#cd "$HOME"
 	"$aFirefoxBin" -no-remote -profile "$profileDir"
 	cd /
 	
-	jpmConsoleLog "runner: Firefox finished. Deleting the temporary profile..."
+	jpmConsoleLog "runner: $gBrowserName finished. Deleting the temporary profile..."
 	rm -rf "$tmpDir"
 )
 

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