4 echo "Arguments missing"
5 echo " $0 <cfg_dir> <images_dir> <deltas_dir> [last_delta]"
8 echo " $0 ./cfg ./images ./deltas 20221110.0"
12 CFG_DIR=$(realpath "$1")
13 IMAGES_DIR=$(realpath "$2")
14 DELTAS_DIR=$(realpath "$3")
17 if [ ! -d "$CFG_DIR" ]; then
18 echo "The given cfg_dir is not a directory"
22 if [ ! -d "$IMAGES_DIR" ]; then
23 echo "The given images_dir is not a directory"
27 if [ ! -d "$DELTAS_DIR" ]; then
28 echo "The given deltas_dir is not a directory"
32 exec docker run --privileged=true --rm \
33 --name delta_builder \
34 --mount=type=bind,source="$IMAGES_DIR",destination=/images \
35 --mount=type=bind,source="$DELTAS_DIR",destination=/result \
36 --mount=type=bind,source="$CFG_DIR",destination=/app/cfg \
37 delta_builder ./pre_run.sh $LAST_DELTA