mirror of
https://gitlab.com/monolithify/base-image-build.git
synced 2024-11-22 08:11:24 +00:00
fix: checksum file name
This commit is contained in:
parent
5588420eaa
commit
967eb0a9da
@ -7,16 +7,16 @@ set -e
|
|||||||
|
|
||||||
if [ ! -f $BASE_DISK_FILEPATH ]; then
|
if [ ! -f $BASE_DISK_FILEPATH ]; then
|
||||||
vmDiskFileURL="https://dl.rockylinux.org/pub/rocky/$ROCKY_VERSION/images/x86_64/$VM_DISK_FILE_TO_DOWNLOAD"
|
vmDiskFileURL="https://dl.rockylinux.org/pub/rocky/$ROCKY_VERSION/images/x86_64/$VM_DISK_FILE_TO_DOWNLOAD"
|
||||||
checksumFileName="$VM_DISK_FILE_TO_DOWNLOAD.CHECKSUM"
|
checksumFile="$BASE_DISK_FILEPATH.CHECKSUM"
|
||||||
vmDiskFileChecksumURL="https://dl.rockylinux.org/pub/rocky/$ROCKY_VERSION/images/x86_64/$checksumFileName"
|
vmDiskFileChecksumURL="https://dl.rockylinux.org/pub/rocky/$ROCKY_VERSION/images/x86_64/$checksumFileName"
|
||||||
|
|
||||||
echo "--- Downloading $vmDiskFileURL ---"
|
echo "--- Downloading $vmDiskFileURL ---"
|
||||||
curl $vmDiskFileURL -o $BASE_DISK_FILEPATH
|
curl $vmDiskFileURL -o $BASE_DISK_FILEPATH
|
||||||
echo "--- Downloading $vmDiskFileChecksumURL ---"
|
echo "--- Downloading $vmDiskFileChecksumURL ---"
|
||||||
curl $vmDiskFileChecksumURL -o $OUTPUT_DIR$checksumFileName
|
curl $vmDiskFileChecksumURL -o $checksumFile
|
||||||
|
|
||||||
echo "--- Checking checksum ---"
|
echo "--- Checking checksum ---"
|
||||||
expectedChecksum=$(cat $OUTPUT_DIR/$checksumFileName | awk 'NR==2 {print $4}')
|
expectedChecksum=$(cat $checksumFile | awk 'NR==2 {print $4}')
|
||||||
if [ $(sha256sum $BASE_DISK_FILEPATH | awk '{print $1}') == "$expectedChecksum" ]; then
|
if [ $(sha256sum $BASE_DISK_FILEPATH | awk '{print $1}') == "$expectedChecksum" ]; then
|
||||||
echo "--- CHECKSUM CONFIRMED ---"
|
echo "--- CHECKSUM CONFIRMED ---"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user