Page MenuHomePhabricator

clone_base.sh
No OneTemporary

clone_base.sh

#!/bin/bash
DST=""
while getopts ":d:" opt; do
case ${opt} in
d )
DST=$OPTARG
;;
\? )
echo "Invalid option: $OPTARG" 1>&2
;;
: )
echo "Invalid option: $OPTARG requires an argument" 1>&2
;;
esac
done
echo ${DST}
if [ -b "${DST}" ]; then
echo "Found block device: ${DST}"
read -p "Press any key to continue... "
else
print "${DST} does not exist or is not a block device."
exit 1
fi
curl -n ~/.netrc \
--silent http://nfs-netboot.engr.unr.edu/images/win10_1909.img.zst | \
zstd --long=31 -T4 -d --stdout -q | \
pv -e -r -p -s 128G > ${DST}
sync

File Metadata

Mime Type
text/x-shellscript
Expires
Fri, Jul 4, 7:51 PM (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16120
Default Alt Text
clone_base.sh (607 B)

Event Timeline