-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sh
executable file
·36 lines (36 loc) · 970 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Build meteor polymer project.
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
echo "Installing bower components."
if bower install; then
echo "Installed bower components."
else
echo "${red}Bower installation failed.!${reset}" 1>&2
exit 1
fi
read -p "Remove demo,test folders & files from bower dir. (y/n)?" CONT
if [ "$CONT" = "y" ]; then
folders=( "demo" "test" "bower_components" )
for i in "${folders[@]}"
do
find ./imports/ui/bower_components/* -depth -name $i -exec rm -rf "{}" \;
done
files=( "demo" "test" )
for i in "${files[@]}"
do
find ./imports/ui/bower_components/* -depth -name "${i}.*" -type f|xargs rm -f
done
echo "Cleanup Successful.!";
else
echo "Cleanup Cancelled";
fi
echo "Installing npm packages."
if meteor npm install; then
echo "Installed npm packages.${reset}"
else
echo "${red}NPM installation failed.!${reset}" 1>&2
exit 1
fi
echo "${green}build complete. run meteor.!${reset}"