#!/bin/bash set -e echo "# THIS FILE IS AUTOMATICALLY GENERATED BY BUILD.SH" >Dockerfile echo "# TO MODIFY DOCKERFILES, SEE THE DIRECTORY NAMED \"dockerfiles\"\n" >>Dockerfile for f in dockerfiles/*; do echo -e "\n# $f" >>Dockerfile cat $f >>Dockerfile done if ! command -v cargo 2 >&1 >/dev/null; then echo "[*] Rust is not installed" exit 0 fi for f in utils/*; do echo "Building $(basename $f)..." pushd $f cargo build -r popd done CMD="" if command -v podman 2 >&1 >/dev/null; then echo "[*] Using podman" CMD="podman" elif command -v docker 2 >&1 >/dev/null; then echo "[*] Using docker" CMD="docker" else echo "[!] No CMD parser installed." exit 1 fi $CMD build . -t arson.pw/minhttpd