Create an build script for Milagro Pin Pad
using build.sh an user can install all dependencies and build the Pin
Pad and mobile app with just one command
diff --git a/README.md b/README.md
index 67e71b0..383e3e5 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,14 @@
The Mobile App is a JavaScript application, much similar to the PIN Pad. The Mobile App also carries out the operations needed to register and authenticate an end-user, but the user is authenticated to a browser session, rather than to a session on the mobile device.
+##Building automatically the PIN Pad
+You can run the following script to install all dependencies for you and build both the PIN PAD and Mobile App
+```
+ > ./build.sh
+```
+It is building with default Milagro theme.
+The built apps should be placed in `<work-dir>/build/out/browser` and `<work-dir>/build/out/mobile`.
+
##Building the PIN Pad
1. NOTE: You might have to update your package distribution system. For Ubuntu you would need to do: `sudo apt-get update`
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..e6d99e6
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,47 @@
+#!/usr/bin/env bash
+
+BASE_DIR=$(pwd)
+
+function install_needed_tools {
+ # update package manager cache
+ sudo apt-get update
+
+ # install node package manager npm
+ sudo apt-get install npm curl git
+
+ sudo npm config set prefix /usr/local
+
+ sudo npm install -g n
+ sudo n 0.10.33
+
+ # Install grunt
+ sudo npm install -g grunt-cli
+
+ # Install handlebars
+ sudo npm install -g handlebars@3.0.1
+
+ # install bower
+ sudo npm install -g bower
+}
+
+function build_mpin {
+ APP_TYPE=$1
+ cd "$BASE_DIR/$APP_TYPE"
+
+ # Install required modules for Node
+ sudo npm install
+
+ # Create settings.json
+ cp settings.json_build settings.json
+
+ # Build the app
+ grunt build
+}
+
+install_needed_tools
+
+# Build browser mpin
+build_mpin browser
+
+# Build mobile mpin
+build_mpin mobile