Write ISO image to SD card script
This commit is contained in:
18
bin/sd-copy
Executable file
18
bin/sd-copy
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -E -o errexit -o nounset -o pipefail
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Not enough arguments!"
|
||||
echo "Use: $0 <source> <destination> [args]"
|
||||
echo "For example: $0 ubuntu.img /dev/sdc"
|
||||
exit 10
|
||||
fi
|
||||
|
||||
SRC="$1"
|
||||
shift
|
||||
DST="$1"
|
||||
shift
|
||||
|
||||
echo "dd if=$SRC of=$DST bs=32MiB status=progress conv=fsync $*"
|
||||
dd if="$SRC" of="$DST" bs=32MiB status=progress conv=fsync "$@"
|
||||
Reference in New Issue
Block a user