diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-07-22 09:46:47 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-07-22 09:46:47 +0300 |
commit | cd22b0d033a96188ef494ee3c8784659cd7ba62e (patch) | |
tree | d9e17d0acaa9c5eb5bafcd95a1096e520d570a56 | |
parent | 15df63ab57dc92d59c03799c6aa30e2e93681c7b (diff) | |
download | v-i-cd22b0d033a96188ef494ee3c8784659cd7ba62e.tar.gz |
feat(write-and-config.sh): require user to specify path to image
Sponsored-by: author
-rwxr-xr-x | write-and-config.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/write-and-config.sh b/write-and-config.sh index fca1b5e..1d293d3 100755 --- a/write-and-config.sh +++ b/write-and-config.sh @@ -4,6 +4,7 @@ set -euo pipefail config="$1" dev="$2" +img="$3" if ! blkid "$dev" >/dev/null; then echo "$dev is not a block device" 1>&2 @@ -12,8 +13,8 @@ fi echo "Unmounting everything in $dev" umount -fv "$dev"* || true -echo "Write installer.img to $dev" -dd if=installer.img bs=1M oflag=direct status=progress of="$dev" +echo "Write $img to $dev" +dd if="$img" bs=1M oflag=direct status=progress of="$dev" sync for fs in "$dev"?; do |