Added auto generation script. This does setup for all files.
+ Updated readme
+ Fixed permissions on script.
Change-Id: I309e020592ec141fde70f09f6fa36f1ee92f6902
diff --git a/client/README.md b/client/README.md
index 88e5cd4..0882445 100644
--- a/client/README.md
+++ b/client/README.md
@@ -6,30 +6,7 @@
Setup
-----
-###To simply run the client code:
-
-You will need the following things setup:
-
-* A NDN backend running somewhere (The default config is pointed at a test backend)
-* NDN-JS
- + Run `git submodule init ndn-js` in the client directory.
- + Then run `git submodule update`
-* Configure the config.json in catalog-dev
- + If it doesn't exist, you will need to copy it from the config-example.json
- + config.json is intentionally left out of the git to prevent overwriting your changes.
-
-_Note: The dev code runs from catalog-dev and is not gauranteed to run across all browsers. Only the deployment code is prepared in such a way that we can promise the code will work. (Internet explorer may work but is not officially supported by either option)_
-
-###To run the deployment code:
-
-You will additionally require npm and node installed (npm is packaged with the default node installation).
-
-Run the following:
-```
-npm install -g gulp
-npm install
-gulp
-```
+To setup the site including the production folder simply run `./autogen.sh`
The site will now be available in the catalog directory.
diff --git a/client/autogen.sh b/client/autogen.sh
new file mode 100755
index 0000000..94690a3
--- /dev/null
+++ b/client/autogen.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+if [ ! hash git 2>/dev/null ]; then
+ echo "git is required for this repo to function properly! Please install it.";
+ exit 1;
+fi
+
+git submodule init ndn-js && git submodule update
+cd ndn-js && ./waf configure && ./waf && cd ..
+
+if [ ! hash npm 2>/dev/null ]; then
+ echo "npm is required to build the production site. Only the dev site will be available.";
+
+else
+
+ if [ ! hash gulp 2>/dev/null ]; then
+ npm install -g gulp
+ npm install
+ fi
+
+ npm upgrade
+
+ gulp
+
+fi
+