Eugenio Romano d739526517 make the local link build fast and run the test only if asked #1588 (#1671)
* make the local link build fast and run the test only if asked #1588

* demo core doesn't exist

* link after install

* move in after success matrix build and install scripts
2017-03-23 10:54:49 +00:00

57 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR/../demo-shell-ng2"
show_help() {
echo "Usage: start.sh"
echo ""
echo "-i or -install start the demo shell and install the dependencies"
echo "-u or -update start the demo shell and update the dependencies"
echo "-c or -cleanInstall clean the demo shell install the dependencies and start the the demo shell"
echo "-l or -link all the ng2-components in the demo shell and start the the demo shell"
}
install() {
npm install
}
update() {
echo "update"
npm run update
}
cleanInstall() {
npm run clean
npm install
}
link() {
echo "link"
"$DIR/npm-link-demo-shell.sh"
}
eval OPTIONS=$1
while [[ $1 == -* ]]; do
case "$1" in
-l|--link) link; shift;;
-*) shift;;
esac
done
shift $(expr $OPTIND - 1 )
while [[ $1 == -* ]]; do
case "$OPTIONS" in
-h|--help|-\?) show_help; exit 0;;
-i|--install) install; shift;;
-u|--update) update; shift;;
-c|--cleanInstall) cleanInstall; shift;;
-*) shift;;
esac
done
npm run start