Commit 468f637b authored by Benjamin Slade's avatar Benjamin Slade

automatic checking of checksum added

parent 9cf1a820
......@@ -10,10 +10,32 @@ wget -N ${VOIDMIRROR}/${VOIDROOTFS}
wget -N ${VOIDMIRROR}/sha256sums.txt
wget -N ${VOIDMIRROR}/sha256sums.txt.sig
tar xfv ./${VOIDFILE} -C ${TARGET}
echo "The checksum of ${VOIDROOTFS} is: "
sha256sum ./${VOIDROOTFS}
SHASUM=`sha256sum ./${VOIDROOTFS}`
echo ${SHASUM}
if [[ `grep ${SHASUM} ./sha256sums.txt` ]]
then
echo "Checksum found. Proceeding."
tar xfv ./${VOIDROOTFS} -C ${TARGET}
else
echo "Checksum not found."
read -p "Do you still want to proceed? (You probably don't.). If so, please type 'yes' in ALLCAPS: " badcheck
if [ ${badcheck} == "YES" ]
then
tar xfv ./${VOIDROOTFS} -C ${TARGET}
else
echo "Cancelled."
fi
fi
echo "You may want to verify this checksum in sha256sums.txt."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment