blob: c863f3f9665c465d9c0fc00abe75ad5066dbfe6c [file] [log] [blame]
#!/bin/bash -e
# Use this script to build the Dockerfiles against an arbitrary
# Flink distribution.
# This is exlusively for development purposes.
source "$(dirname "$0")"/common.sh
function usage() {
echo >&2 "usage: $0 -u binary-download-url [-n name]"
}
binary_download_url=
name=custom
while getopts u:n:h arg; do
case "$arg" in
u)
binary_download_url=$OPTARG
;;
n)
name=$OPTARG
;;
h)
usage
exit 0
;;
\?)
usage
exit 1
;;
esac
done
if [ -z "${binary_download_url}" ]; then
usage
exit 1
fi
mkdir -p "dev"
echo -n >&2 "Generating Dockerfiles..."
for source_variant in "${SOURCE_VARIANTS[@]}"; do
dir="dev/${name}-${source_variant}"
rm -rf "${dir}"
generate "${dir}" "${binary_download_url}" "" "" false ${source_variant}
done
echo >&2 " done."