feat: Flash compressed image to sd card
This commit is contained in:
commit
949e0e000d
1 changed files with 13 additions and 0 deletions
13
provision-pi.sh
Executable file
13
provision-pi.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
flash_sd () {
|
||||||
|
img_file=$1
|
||||||
|
sd_card=$2
|
||||||
|
echo "Flashing $img_file to $sd_card ..."
|
||||||
|
xzcat --stdout $img_file | dd of=$sd_card status=progress
|
||||||
|
}
|
||||||
|
|
||||||
|
read -e -p "Compressed Image file: " IMG_FILE
|
||||||
|
read -e -p "SD Card: " SD_CARD
|
||||||
|
|
||||||
|
flash_sd "$IMG_FILE" "$SD_CARD"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue