...
1#!/hint/bash
2set -e
3
4busyprograms=(
5 #entrypoint
6 kubestatus
7 watt
8 agent
9 apiext
10)
11sudo install -D -t /opt/ambassador/bin/ /buildroot/bin/busyambassador
12for busyprogram in "${busyprograms[@]}"; do
13 # Create symlinks to the multi-call binary so the original names can be used in
14 # the builder shell easily (from the shell PATH).
15 ln -sf /buildroot/bin/busyambassador /buildroot/bin/"$busyprogram"
16 # Stuff in /opt/ambassador/bin in the builder winds up in /usr/local/bin in the
17 # production image.
18 sudo ln -sf /opt/ambassador/bin/busyambassador /opt/ambassador/bin/"$busyprogram"
19done
20
21sudo install /buildroot/bin/capabilities_wrapper /opt/ambassador/bin/wrapper
22
23# Copy installer support into /opt/image-build to be run at docker build for the
24# production image. Then run the installers for the builder container.
25# Note: When this (ambassador's) post-compile runs, it always runs first, and
26# every other post-compile runs as well. So this is the place to recreate the
27# /opt/image-build tree from scratch so the builder container stays valid.
28sudo rm -rf /opt/image-build
29sudo install -D -t /opt/image-build /buildroot/ambassador/build-aux/install.sh
30sudo cp -a /buildroot/ambassador/build-aux/installers /opt/image-build/
31sudo /opt/image-build/install.sh
32
33# run any extra, local post-compile task
34if [ -f post-compile.local.sh ] ; then
35 bash post-compile.local.sh
36fi
View as plain text