-
Notifications
You must be signed in to change notification settings - Fork 4
/
kcapp-req.sh
executable file
·46 lines (41 loc) · 995 Bytes
/
kcapp-req.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
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
print_result() {
EXIT_CODE=$(echo $?)
if [ "$EXIT_CODE" == "0" ] ; then
echo -e " - \e[32mDONE\e[39m"
else
echo -e " - \e[91mFAILED\e[39m"
fi
}
print_done() {
echo -e
echo -ne "===================================="
print_result
}
echo "Compiling all pages"
declare -a PAGES=("/"
"/players"
"/players/1/statistics"
"/statistics/weekly"
"/tournaments"
"/tournaments/1"
"/elo"
"/offices"
"/tournaments/admin"
"/matches/1/result"
"/legs/1"
"/legs/1/result"
"/matches/page/1"
"/tournaments/1/player/1"
"/tournaments/admin"
"/players/compare"
"/controller"
"/badges"
"/badges/1"
"/practice")
for PAGE in "${PAGES[@]}"; do
printf "Requesting %-25s" $PAGE
curl -s "http://localhost:3000$PAGE" > /dev/null
print_result
done
print_done