[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r20402: {torbrowser} It's insanity to have a multi-line for .. do .. loop in Make (torbrowser/trunk/build-scripts)



Author: ioerror
Date: 2009-08-27 20:47:46 -0400 (Thu, 27 Aug 2009)
New Revision: 20402

Added:
   torbrowser/trunk/build-scripts/configure-firefox.sh
Modified:
   torbrowser/trunk/build-scripts/Makefile.linux
Log:
It's insanity to have a multi-line for .. do .. loop in Makefiles. I think it's better to have a helper for configuring firefox and I've added just such a helper here.


Modified: torbrowser/trunk/build-scripts/Makefile.linux
===================================================================
--- torbrowser/trunk/build-scripts/Makefile.linux	2009-08-27 19:25:10 UTC (rev 20401)
+++ torbrowser/trunk/build-scripts/Makefile.linux	2009-08-28 00:47:46 UTC (rev 20402)
@@ -176,10 +176,12 @@
 CONFIG_SRC=config
 
 ## Destination for the generic bundle
-DEST="Generic Bundle"
+#DEST="Generic Bundle"
+DEST=Generic\ Bundle
 
 ## Name of the bundle"
-NAME="Tor Browser"
+#NAME="Tor Browser"
+NAME=Tor\ Browser
 
 ## Version and name of the compressed bundle (also used for source)
 VERSION=1.2.4
@@ -437,12 +439,9 @@
 	## Make a dummy profile to stop Firefox creating some large files
 	#cp -R $(BUNDLE)/.mozilla/DefaultData $(DUMMYPROFILE)
 	## Install default extensions and everything from extensions directory
-	-for extension in langpack_$(LANGCODE).xpi $(DEFAULT_EXTENSIONS) $(EXTENSIONS_DIR)/*.xpi $(EXTENSIONS_DIR)/*.jar; \
-	  do \
-             echo "Attempting to install $$extension" && export HOME=$(BUNDLE) && \
-             ./$(BUNDLE)/App/firefox/firefox \
-             -profile firefox \
-             -install-global-extension $$extension; \
+	for extension in langpack_$(LANGCODE).xpi $(DEFAULT_EXTENSIONS) $(EXTENSIONS_DIR)/*.xpi $(EXTENSIONS_DIR)/*.jar; \
+          do \
+            ./configure-firefox.sh $(BUNDLE) $$extension;\
           done
 	## Delete the dummy profile
 	rm -fr $(DUMMYPROFILE)

Added: torbrowser/trunk/build-scripts/configure-firefox.sh
===================================================================
--- torbrowser/trunk/build-scripts/configure-firefox.sh	                        (rev 0)
+++ torbrowser/trunk/build-scripts/configure-firefox.sh	2009-08-28 00:47:46 UTC (rev 20402)
@@ -0,0 +1,20 @@
+#!/bin/sh
+## This is a little sanity providing app that when run in a loop it will:
+## 1) Setup the environment properly
+## 2) Change to the proper $HOME directory
+## 3) Install a single .xpi or Firefox extension
+## 4) Profit!
+##
+
+STARTDIR="`pwd`";
+BUNDLE=$1
+EXTENSION=$2;
+HOME="`pwd`"/$BUNDLE;
+export $HOME;
+
+FIREFOX=./App/firefox/firefox
+FIREFOX_ARGS=-install-global-extension
+cd $HOME;
+echo "We're now in $PWD"
+echo "Attempting to run: $FIREFOX $FIREFOX_ARGS";
+echo


Property changes on: torbrowser/trunk/build-scripts/configure-firefox.sh
___________________________________________________________________
Added: svn:executable
   + *