-
Notifications
You must be signed in to change notification settings - Fork 0
/
build
executable file
·27 lines (19 loc) · 855 Bytes
/
build
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
#!/bin/bash
################################################################################
# generic local build script for epics-containers ioc repositories #
################################################################################
# set TARGET_ARCHITECTURE to rtems for RTEMS based targets
T_A=${TARGET_ARCHITECTURE:-linux}
# set TARGET to runtime for runtime images
TARGET=${TARGET:-developer}
# set TAG to override the default tag
TAG=${TAG:-ec_test}
# log commands and stop on erros
set -xe
cd $(dirname ${0})
# use docker if available else use podman
if ! docker version &>/dev/null; then docker=podman; else docker=docker; fi
# make sure new repos get their submodule ibek-support
git submodule update --init
# build and developer images
$docker build -t ${TAG} --build-arg TARGET_ARCHITECTURE=$T_A --target $TARGET .