2020-09-01 22:07:54 +00:00
|
|
|
#!/bin/bash
|
2020-09-02 23:03:23 +00:00
|
|
|
set -xe
|
2020-09-01 22:07:54 +00:00
|
|
|
cd "$(dirname "$0")"
|
2020-09-02 23:03:23 +00:00
|
|
|
source util/vars.sh
|
2020-09-01 22:07:54 +00:00
|
|
|
|
2020-09-02 23:03:23 +00:00
|
|
|
rm -f Dockerfile
|
2020-09-01 22:07:54 +00:00
|
|
|
|
|
|
|
to_df() {
|
|
|
|
printf "$@" >> Dockerfile
|
|
|
|
echo >> Dockerfile
|
|
|
|
}
|
|
|
|
|
2020-09-03 01:13:45 +00:00
|
|
|
to_df "FROM $REPO:base-$TARGET"
|
2020-09-01 22:07:54 +00:00
|
|
|
to_df "ENV TARGET $TARGET"
|
|
|
|
to_df "ENV VARIANT $VARIANT"
|
|
|
|
to_df "ENV REPO $REPO"
|
2020-09-02 16:07:59 +00:00
|
|
|
|
2020-09-01 22:07:54 +00:00
|
|
|
to_df "ENV FFPREFIX /opt/ffbuild"
|
2020-09-02 16:07:59 +00:00
|
|
|
to_df "ENV PKG_CONFIG_LIBDIR /opt/ffbuild/lib/pkgconfig"
|
2020-09-01 22:07:54 +00:00
|
|
|
|
|
|
|
for script in scripts.d/*.sh; do
|
|
|
|
(
|
|
|
|
SELF="$script"
|
|
|
|
source $script
|
2020-09-02 16:07:59 +00:00
|
|
|
ffbuild_enabled || exit 0
|
2020-09-01 22:07:54 +00:00
|
|
|
ffbuild_dockerstage || exit $?
|
|
|
|
)
|
|
|
|
done
|