_default: just --list # Check if host directory exists host-dir-exists host: #!/usr/bin/env sh if [ ! -d {{host}} ]; then echo "{{host}} does not exist" exit 1 fi # Check host reachability via ping host-reachable host: (host-dir-exists host) #!/usr/bin/env sh ping -w 1 -c 1 $(cat ./{{host}}/ADDRESS) if [ $? -ne 0 ]; then echo "{{host}} is not reachable" exit 1 fi # Test the IMGBUILD by building an image test host: (host-dir-exists host) #!/usr/bin/env sh cd ./{{host}} sudo makeimg --format "raw 4g msdos ext4" get-anemos host: (host-reachable host) #!/usr/bin/env/sh address=$(cat ./{{host}}/ADDRESS) ssh root@$address wget https://git.sr.ht/~bitfehler/anemos-cli/blob/master/anemos