diff options
Diffstat (limited to 'freedom-maker/copy2img.sh')
-rwxr-xr-x | freedom-maker/copy2img.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/freedom-maker/copy2img.sh b/freedom-maker/copy2img.sh new file mode 100755 index 0000000..c11b0a6 --- /dev/null +++ b/freedom-maker/copy2img.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +if [ -b "$1" ] +then + DEV=$1 +else + echo "need to specify a card device (eg, /dev/sdb)" + exit 1 +fi + +NAME="torouter-dev" +if [ -n "$2" ] +then + NAME=$2 +fi + +echo "dd-ing $DEV to $NAME.img" +dd if=$DEV of=$NAME.img bs=1M +echo "gzip compressing image" +gzip $NAME.img + |