From e191582a02196e38d00236dd432748572bd30682 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Fri, 7 Sep 2012 12:24:19 -0700 Subject: chore(scripts): add init-repo script --- init-repo.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 init-repo.sh (limited to 'init-repo.sh') 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 -- cgit v1.2.3