Show file checksum menu title according to the existence of checksum value.

This commit is contained in:
longpanda
2023-01-10 12:23:35 +08:00
parent 1300f7f4f1
commit c308892db0
3 changed files with 191 additions and 44 deletions

View File

@@ -1,9 +1,8 @@
unset vtchkdef
vt_vtoychksum_exist "${vtoy_iso_part}" "${VTOY_CHKSUM_FILE_PATH}"
set vtchksumfile=$?
vt_vtoychksum_exist "${VTOY_CHKSUM_FILE_PATH}"
if [ -f "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.md5" -o $vtchksumfile -eq 0 ]; then
if [ "$VT_EXIST_MD5" = "1" ]; then
if [ -z "$vtchkdef" ]; then
set default=0
set vtchkdef=1
@@ -24,7 +23,7 @@ else
}
fi
if [ -f "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha1" -o $vtchksumfile -eq 0 ]; then
if [ "$VT_EXIST_SHA1" = "1" ]; then
if [ -z "$vtchkdef" ]; then
set default=1
set vtchkdef=1
@@ -47,7 +46,7 @@ fi
if [ -f "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha256" -o $vtchksumfile -eq 0 ]; then
if [ "$VT_EXIST_SHA256" = "1" ]; then
if [ -z "$vtchkdef" ]; then
set default=2
set vtchkdef=1
@@ -70,7 +69,7 @@ fi
if [ -f "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}.sha512" -o $vtchksumfile -eq 0 ]; then
if [ "$VT_EXIST_SHA512" = "1" ]; then
if [ -z "$vtchkdef" ]; then
set default=3
set vtchkdef=1