-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdo.sh
More file actions
executable file
·39 lines (35 loc) · 1.21 KB
/
do.sh
File metadata and controls
executable file
·39 lines (35 loc) · 1.21 KB
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
usage() {
echo "Usage $0 (build-linux|docker-image|docker-dep|docker-build|test-sync|sync)"
}
if [ "$1" == "" ]; then
usage
exit 1
fi
while (( "$#" )); do
case "$1" in
build-linux)
env GOOS=linux GOARCH=amd64 go build cmd/spaceDevices/spaceDevices.go
env GOOS=linux GOARCH=amd64 go build cmd/unkownDevices/listUnkown.go
;;
docker-image)
docker build -t space-devices-build docker/
;;
docker-dep)
docker run --rm -it -v $(pwd):/go/src/github.com/ktt-ol/spaceDevices -u $(id -u):$(id -g) space-devices-build dep ensure -v -vendor-only
;;
docker-build)
docker run --rm -it -v $(pwd):/go/src/github.com/ktt-ol/spaceDevices -u $(id -u):$(id -g) space-devices-build ./do.sh build-linux
;;
test-sync)
rsync -n -avzi --delete spaceDevices listUnkown webUI macVendorDb.csv root@spacegate:/home/status/spaceDevices2/
;;
sync)
rsync -avzi --delete spaceDevices listUnkown webUI macVendorDb.csv root@spacegate:/home/status/spaceDevices2/
;;
*)
usage
exit 1
esac
shift
done