forked from HDFGroup/hsds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·39 lines (34 loc) · 971 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
37
38
39
#!/bin/bash
run_pyflakes=1
if [ $# -gt 0 ]; then
if [ $1 == "-h" ] || [ $1 == "--help" ]; then
echo "Usage: build.sh [--nolint]"
exit 1
fi
if [ $1 == "--nolint" ]; then
echo "no pyflakes"
run_pyflakes=
fi
fi
if [ $run_pyflakes ]; then
echo "running pyflakes on hsds"
if [ $(./pyflakes.sh -count hsds) -ge 1 ]; then
echo "pyflakes errors in hsds..."
./pyflakes.sh hsds
exit 1
fi
echo "running pyflakes on hsds/util"
if [ $(./pyflakes.sh -count hsds/util) -ge 1 ]; then
echo "pyflakes errors in hsds/util..."
./pyflakes.sh hsds/util
exit 1
fi
fi
echo "clean stopped containers"
docker rm -v $(docker ps -aq -f status=exited)
if [ ! -f admin/config/passwd.txt ]; then
echo "password file not found, using default passwords"
cp admin/config/passwd.default admin/config/passwd.txt
fi
echo "building docker image"
docker build -t hdfgroup/hsds .