#!/usr/bin/env bash set -euo pipefail DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "$DIR/argparse.bash" || exit 1 argparse "$@" <" '{print $1}')" if [ $? -ne 0 ]; then echo -e "\nerror getting file name" exit 1 fi CURRENT_RASPBIAN_URL="https://downloads.raspberrypi.org/${VARIANT}/images/${CURRENT_RASPBIAN}/${CURRENT_RASPBIAN_FILE}" echo " from ${CURRENT_RASPBIAN_URL}" curl -L -o "${DEST}/src/image/${CURRENT_RASPBIAN_FILE}" "${CURRENT_RASPBIAN_URL}" fi