-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_dahdi.sh
executable file
·44 lines (36 loc) · 1.06 KB
/
build_dahdi.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
#!/bin/bash
help() {
echo "./convert.sh <coreos_channel> <coreos_version>"
echo "Environment variables needed:"
echo "Variable Example"
echo "DOCKER_REGISTRY myprivaterepo.com"
echo "COREOS_DEV_IMAGE coreos/dev-container"
echo "KBUILDER_IMAGE coreos/kmod-builder"
echo "DAHDI_INJECTOR_IMAGE coreos/dahdi-injector"
echo
echo "Depending on your version of docker you might need to set DOCKER_API_VERSION."
exit 1
}
COREOS_CHANNEL="$1"
COREOS_VERSION="$2"
DAHDI_VERSION="$3"
if [ -z "$COREOS_CHANNEL" ]; then
echo "No CoreOS channel defined. Please set \$COREOS_CHANNEL"
help
fi
if [ -z "$COREOS_VERSION" ]; then
echo "No CoreOS version defined. Please set \$COREOS_VERSION"
help
fi
if [ -z "$DAHDI_VERSION" ]; then
echo "No Dahdi version defined. Please set \$DAHDI_VERSION"
help
fi
if [ -z "$DOCKER_REGISTRY" ]; then
echo "No private registry set. Please set \$DOCKER_REGISTRY"
help
fi
cd kbuilder
./build.sh $COREOS_CHANNEL $COREOS_VERSION
cd ../dahdi
./build.sh $COREOS_VERSION $DAHDI_VERSION