#!/usr/local/bin/zsh # # Author: Dominic Reich DATE=$(date +%Y%d%m) FILENAME=$(ls -1 *.iso) BASENAME=$(basename ${FILENAME} .iso) BACKUPFILE=${BASENAME}.backup-$DATE.iso # backup old image xz -c ${FILENAME} > ${BACKUPFILE}.xz # download fresh image file curl -O https://www.tuxedocomputers.com/webfai/webfai-nb/ipxe-stick-webfai-nb_current.iso