Update build-rootfs

This commit is contained in:
Jack L. Frost 2023-10-31 02:03:07 +00:00
parent c3fbf5bdd1
commit 3d73c0b964

View File

@ -1,14 +1,14 @@
#!/bin/sh #!/usr/bin/env bash
workdir="$HOME/public/rootfs" workdir="${DESTDIR:-$HOME/public/rootfs}"
filename="spark-x86_64-$(date '+%Y%m%d').tar.zst" filename="spark-x86_64-$(date '+%Y%m%d').tar.zst"
cd "$workdir" cd "$workdir"
podman create --name spark-rootfs localhost/spark:latest bash podman create --name spark-rootfs localhost/spark:latest bash
podman export spark-rootfs | zstd > ".$filename.part" podman export spark-rootfs | zstd > ".$filename.part"
podman rm spark-rootfs podman rm spark-rootfs
mv ".$filename.part" "$filename" mv ".$filename.part" "$filename"
./switch "$filename" [[ -f ./switch ]] && ./switch "$filename"