Hey we need to grep out of a file

This commit is contained in:
Salt 2020-12-02 19:26:16 -06:00
parent e964612ae7
commit 81357d6465

View File

@ -110,12 +110,12 @@ build-gentoo() {
if ! [ -f "$stage3file" ]; then
log "Downloading stage3"
curl -s "$stage3" -o "$stage3file"
elif ! grep -e "$(sha512sum "$stage3file" | awk '{print $1}')"; then
elif ! grep "$stage3sig" -e "$(sha512sum "$stage3file" | awk '{print $1}')"; then
log "Checksum verification failed; downloading new stage3"
curl -s "$stage3" -o "$stage3file"
fi
# At this point, we should have a new stage3 that matches our signature; die of not
if ! grep -e "$(sha512sum "$stage3file" | awk '{print $1}')"; then
if ! grep "$stage3sig" -e "$(sha512sum "$stage3file" | awk '{print $1}')"; then
error "stage3 checksum verification failed" 50
fi
log "Decompressing tarball; this will prompt for root privileges"