From 173cbda794fdfa4a3628434f18975f1365927409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Sat, 10 Dec 2022 22:02:06 +0100 Subject: [PATCH] Actualizado chd_from_7z.sh --- chd_from_7z.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/chd_from_7z.sh b/chd_from_7z.sh index 8dfbee7..9d1908d 100755 --- a/chd_from_7z.sh +++ b/chd_from_7z.sh @@ -1,28 +1,31 @@ #!/bin/bash -###place this script into root folder that contains .7z PSX archives -###may need to chmod +x file to make executable +## Place this script into root folder that contains .7z archives +## May need to chmod +x file to make executable -###uncomment below if required software not on system +## Uncomment below if required software not on system #sudo apt-get install -y mame-tools p7zip-full -#extract 7z +## Extract 7z for x7zFile in *.7z; do gameName="$(basename "$x7zFile" .7z)" - echo "!!!!!!!!!!Extracting ${gameName}..." + echo ">> Extracting ${gameName}" 7z x "${x7zFile}" -o./"${gameName}-tmp" - #convet to chd - echo "!!!!!!!!!!Converting ${gameName}..."a - chdman createcd -i "./${gameName}-tmp/${gameName}cue" -o ./"${gameName}.chd" + ## Convet to chd + echo ">> Converting ${gameName}" + chdman createcd -i "./${gameName}-tmp/${gameName}.cue" -o ./"${gameName}.chd" - #rm temporary directory + ## Delete temporary directory rm -R ./"${gameName}-tmp" - ### uncomment below to rm the original 7z archive - #rm ./"$x7zFile" - - echo "!!!!!!!!!!${gameName} complete..." + ## Delete original 7z archive + if [ -f ./"${gameName}.chd" ]; then + rm ./"$x7zFile" + echo ">> ${gameName} complete" + else + echo ">> ${gameName} failed" + fi done