aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVojta Jina2012-09-07 12:24:19 -0700
committerMisko Hevery2012-09-11 17:27:57 -0700
commit2e1539356a7ace9512110acea9808d497ed0789f (patch)
treecb03c43257e1f717b86bff27adfecc2501a51b59
parent331cd5a8cb5efdafe8ad7eb386aed4033cfc1bb3 (diff)
downloadangular.js-2e1539356a7ace9512110acea9808d497ed0789f.tar.bz2
chore(scripts): add init-repo script
-rwxr-xr-xinit-repo.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/init-repo.sh b/init-repo.sh
new file mode 100755
index 00000000..12c2eff5
--- /dev/null
+++ b/init-repo.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+#
+# Script to initialize angular repo
+# - install required node packages
+# - install Testacular
+# - install git hooks
+
+
+node=`which node 2>&1`
+if [ $? -ne 0 ]; then
+ echo "Please install NodeJS."
+ echo "http://nodejs.org/"
+ exit 1
+fi
+
+npm=`which npm 2>&1`
+if [ $? -ne 0 ]; then
+ echo "Please install NPM."
+fi
+
+
+echo "Installing required npm packages..."
+npm install
+
+testacular=`which testacular 2>&1`
+if [ $? -ne 0 ]; then
+ echo "Installing Testacular..."
+ npm install -g testacular
+fi
+
+echo "Installing git hooks..."
+ln -sf ../../validate-commit-msg.js .git/hooks/commit-msg