9
0
Fork 0
barebox/board/ipe337/env/bin/_update

24 lines
340 B
Plaintext

echo "updating $image to $part"
if [ -z "$part" -o -z "$image" ]; then
echo "define \$part and \$image"
exit 1
fi
if [ \! -e "$part" ]; then
echo "Partition $part does not exist"
exit 1
fi
if [ $# = 1 ]; then
image=$1
fi
if [ x$ip = xdhcp ]; then
dhcp
fi
unprotect $part
erase $part
tftp $image $part