aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorNateN1222 <nathannichols454@gmail.com>2018-01-27 11:29:55 -0600
committerNateN1222 <nathannichols454@gmail.com>2018-01-27 11:29:55 -0600
commitf2e22d8a5ff480e776b2d6f5bcae2de662dc6c70 (patch)
tree7e3ec38832881b0d407f97e27d1a018a336730b7 /build.sh
parent4089cd1dcd7c303e709331c299521266a0b2bdd7 (diff)
Created a basic build script mostly to serve as an example of what files
actually get uploaded to Mozilla.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..2f3ebd9
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,26 @@
+# Build the main file
+browserify main_background.js -o bundle.js
+
+# Create a temp directory
+mkdir ./build_temp
+
+# Move source files to temp directory
+cp -r icons ./build_temp
+cp -r ./html ./build_temp
+cp manifest.json ./build_temp
+cp contact_finder.js ./build_temp
+cp bundle.js ./build_temp
+
+# build zip file from temp directory
+cd ./build_temp
+zip -r librejs.zip *
+# remove old file
+rm ../librejs.xpi || true
+# move new zip file
+mv librejs.zip ../
+# go back to source dir and remove temp directory
+cd ../
+rm -r ./build_temp
+# change the zip file to a xpi file that can be uploaded
+mv librejs.zip librejs.xpi
+