Taken from RasPi Stack Exchange
Created
October 3, 2013 11:15
-
-
Save M1ke/6808171 to your computer and use it in GitHub Desktop.
Bash scripts for copying images to and from drives. Made with the intention of replicating SD cards for Raspberry Pi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# img will have gz appended | |
img=$1 | |
drive=$2 | |
dd if=$drive | gzip > $img.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# img must be gz | |
img=$1 | |
drive=$2 | |
gzip -dc $img | dd of=$drive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment