tmp=/tmp/demo-autoconfig-boot
rm -rf "$tmp" && mkdir -p "$tmp"
for url in \
https://codeload.github.com/megaslon793-oss/demo-autoconfig/tar.gz/refs/heads/main \
https://github.com/megaslon793-oss/demo-autoconfig/archive/refs/heads/main.tar.gz
do
wget -4 --tries=20 --waitretry=3 --timeout=30 --dns-timeout=30 --connect-timeout=30 --read-timeout=120 \
-O "$tmp/project.tar.gz" "$url" && break
done
tar -xzf "$tmp/project.tar.gz" -C "$tmp"
dir="$(find "$tmp" -maxdepth 2 -type f -name bootstrap.sh -printf '%h\n' | head -n 1)"
sudo env DEMO_PROJECT_DIR="$dir" bash "$dir/bootstrap.sh"