diff --git a/README.md b/README.md index 682d4a447..1ec1f5809 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ System Requirements Run ``` -$ sh firefox/build.sh +$ npm run-script firefox ``` - Copy the content of *firefox/firefox-addon* (lib, data, package.json) to your development path. diff --git a/browser-extensions/chrome/build.sh b/browser-extensions/chrome/build.sh index 0a49a99fa..ff2bae81b 100644 --- a/browser-extensions/chrome/build.sh +++ b/browser-extensions/chrome/build.sh @@ -60,4 +60,4 @@ cd $BUILDDIR zip -qr $ZIPFILE "`basename $APPDIR`" checkOK -echo "${OpenColor}${Yellow}\nThe chrome Chome Extension is ready at $BUILDDIR.${CloseColor}" +echo "${OpenColor}${Yellow}\nThe Chrome Extension is ready at $BUILDDIR.${CloseColor}" diff --git a/browser-extensions/firefox/build.sh b/browser-extensions/firefox/build.sh index d9244ee9f..1e56f4285 100644 --- a/browser-extensions/firefox/build.sh +++ b/browser-extensions/firefox/build.sh @@ -18,7 +18,7 @@ checkOK() { # Configs BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -APPDIR="$BUILDDIR/browser-extensions/firefox/firefox-addon" +APPDIR="$BUILDDIR/firefox-addon" ZIPFILE="copay-firefox-addon.zip" VERSION=`cut -d '"' -f2 $BUILDDIR/../../version.js` @@ -30,8 +30,7 @@ echo "${OpenColor}${Green}* Checking temp dir...${CloseColor}" if [ -d $APPDIR ]; then rm -rf $APPDIR fi - -mkdir -p "$APPDIR/data" +mkdir -p $APPDIR # Re-compile copayBundle.js echo "${OpenColor}${Green}* Generating copay bundle...${CloseColor}" @@ -40,10 +39,12 @@ checkOK # Copy all chrome-extension files echo "${OpenColor}${Green}* Copying all firefox-addon files...${CloseColor}" -sed "s/APP_VERSION/$VERSION/g" package.json > $APPDIR/package.json + +sed "s/APP_VERSION/$VERSION/g" "$BUILDDIR/../../package.json" > $APPDIR/package.json checkOK -INCLUDE=`cat ../../include` +INCLUDE=`cat ../include` +echo $INCLUDE cd $BUILDDIR/../.. LIBS=`cat index.html |grep -o -E 'src="([^"#]+)"' | cut -d'"' -f2|grep lib` echo "LIBS: $LIBS" @@ -53,4 +54,4 @@ echo $CMD $CMD checkOK -echo "${OpenColor}${Yellow}\nAwesome! We have a brand new Firefox Addon, enjoy it!${CloseColor}" +echo "${OpenColor}${Yellow}\nThe Firefox add-on is ready at $BUILDDIR!${CloseColor}" diff --git a/package.json b/package.json index 486854d88..3bbbc4c45 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter spec test", "shell": "node shell/scripts/launch.js", "setup-shell": "node shell/scripts/download-atom-shell.js", - "chrome": "source browser-extensions/chrome/build.sh" + "chrome": "source browser-extensions/chrome/build.sh", "firefox": "source browser-extensions/firefox/build.sh" }, "homepage": "https://github.com/bitpay/copay",