diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-02-25 07:48:55 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-02-25 07:48:55 +0100 |
| commit | a9c3eeb4c2eb519cd61963c3e90c8029e67a9112 (patch) | |
| tree | 078a5c06d532877ac6e31cea4a388e1867ee5d8d /bin/run-riscv-qemu.sh | |
| parent | a2bff2d242dc6684f51430a909234d28226fd475 (diff) | |
| download | dotfiles-a9c3eeb4c2eb519cd61963c3e90c8029e67a9112.tar.gz dotfiles-a9c3eeb4c2eb519cd61963c3e90c8029e67a9112.zip | |
bin: cleanup the busybox /home only when a binary was provided
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'bin/run-riscv-qemu.sh')
| -rwxr-xr-x | bin/run-riscv-qemu.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/run-riscv-qemu.sh b/bin/run-riscv-qemu.sh index bdcb2b5..52505a4 100755 --- a/bin/run-riscv-qemu.sh +++ b/bin/run-riscv-qemu.sh @@ -39,6 +39,9 @@ while [[ $# -gt 0 ]]; do ;; *) if [ ! -z "$BUSYBOX_SRC" ]; then + echo "run-riscv-qemu (info): including '$1' to the VM" + + rm -rf "$BUSYBOX_SRC/initramfs/home" mkdir -p "$BUSYBOX_SRC/initramfs/home/$(whoami)" cp "$1" "$BUSYBOX_SRC/initramfs/home/$(whoami)/" fi @@ -80,7 +83,7 @@ if [ -z "$KERNEL" ]; then exit 1 fi fi -echo "run-riscv-qemu (info): using '\$KERNEL' as the Linux kernel Image." +echo "run-riscv-qemu (info): using '$KERNEL' as the Linux kernel Image." ## # If the user provided a disk option, run QEMU with that disk in mind. @@ -110,10 +113,6 @@ if [ -z "$BUSYBOX_SRC" ]; then exit 1 fi -# Cleanup older environments. -rm -rf "$BUSYBOX_SRC/initramfs/home" -mkdir -p "$BUSYBOX_SRC/initramfs/home" - pushd "$BUSYBOX_SRC/initramfs" find . -print0 | cpio --null -o --format=newc | gzip -9 >../initramfs.cpio.gz popd |
