-
Notifications
You must be signed in to change notification settings - Fork 0
/
SmokeTest
executable file
·92 lines (79 loc) · 1.8 KB
/
SmokeTest
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#! /bin/bash
RED='\033[0;31m'
LIGHT_RED='\033[1;31m'
LIGHT_GREEN='\033[1;32m'
YELLOW='\033[1;33m'
BLUE='\033[1;36m'
NC='\033[0m' # No Color
# Use set -e to exit on error
set -e
function check() {
if [ -d $1 ]; then
cd $1
else
echo "Directory $1 does not exist."
echo "Please fix the problem and try again."
exit
fi
pwd
if [ ! -d node_modules ]; then
# npm install
ln -s ~/tmp/node_modules node_modules
fi
grunt check
cd ..
}
A1=Week02-BasicTypes
A2=Week02-BasicTypesExpress
BASIC_TYPES="$A1 $A2"
A_OK=false
function basicTypes() {
for i in $BASIC_TYPES
do
if [ -d $i ]; then
echo -e $LIGHT_GREEN"Directory $BLUE$i$LIGHT_GREEN exists$NC"
A_OK=true
check "$i"
else
echo -e $LIGHT_RED"Directory $BLUE$i$LIGHT_RED does not exist$NC"
fi
done
if $A_OK ; then
echo -e $LIGHT_GREEN"BasicTypes has at least one good directory.$NC"
else
echo -e $LIGHT_RED"Basic Types is not good$NC"
exit 1
fi
}
function fancy() {
if [ -d $A1 ]; then
echo "Directory $A1 exists"
else
if [ -d $A2 ]; then
echo "Directory $A2 exists"
else
echo "Neither Directory $A1 or $A2 exists"
fi
fi
}
function Weeks01To04() {
check Week01-ExpressBasics/
basicTypes
check Week02-GetNumbers/
check Week02-JavaScriptObjects/
check Week02-ObjectBasicsJasmine/
check Week03-CouchDbDemo/
check Week03-CouchDbViews/
check Week03-ExpressJQuery/
check Week03-ExpressRoutes/
check Week04-PointerLock/
check Week04-ThreeFloor/
check Week04-ThreeJsBasics/
}
function Weeks05To07 {
check Week05-MazeBuilder/
check Week06-MazeDataReader/
#check Week07-Midterm/
}
Weeks01To04
Weeks05To07