Actualizado chd_from_7z.sh
This commit is contained in:
+16
-13
@@ -1,28 +1,31 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
###place this script into root folder that contains .7z PSX archives
|
## Place this script into root folder that contains .7z archives
|
||||||
###may need to chmod +x file to make executable
|
## 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
|
#sudo apt-get install -y mame-tools p7zip-full
|
||||||
|
|
||||||
#extract 7z
|
## Extract 7z
|
||||||
for x7zFile in *.7z; do
|
for x7zFile in *.7z; do
|
||||||
gameName="$(basename "$x7zFile" .7z)"
|
gameName="$(basename "$x7zFile" .7z)"
|
||||||
echo "!!!!!!!!!!Extracting ${gameName}..."
|
echo ">> Extracting ${gameName}"
|
||||||
7z x "${x7zFile}" -o./"${gameName}-tmp"
|
7z x "${x7zFile}" -o./"${gameName}-tmp"
|
||||||
|
|
||||||
#convet to chd
|
## Convet to chd
|
||||||
echo "!!!!!!!!!!Converting ${gameName}..."a
|
echo ">> Converting ${gameName}"
|
||||||
chdman createcd -i "./${gameName}-tmp/${gameName}cue" -o ./"${gameName}.chd"
|
chdman createcd -i "./${gameName}-tmp/${gameName}.cue" -o ./"${gameName}.chd"
|
||||||
|
|
||||||
#rm temporary directory
|
## Delete temporary directory
|
||||||
rm -R ./"${gameName}-tmp"
|
rm -R ./"${gameName}-tmp"
|
||||||
|
|
||||||
### uncomment below to rm the original 7z archive
|
## Delete original 7z archive
|
||||||
#rm ./"$x7zFile"
|
if [ -f ./"${gameName}.chd" ]; then
|
||||||
|
rm ./"$x7zFile"
|
||||||
echo "!!!!!!!!!!${gameName} complete..."
|
echo ">> ${gameName} complete"
|
||||||
|
else
|
||||||
|
echo ">> ${gameName} failed"
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user