Primer commit

This commit is contained in:
2020-12-18 08:35:41 +00:00
commit 437783b4e1
7 changed files with 364 additions and 0 deletions
Executable
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
###place this script into root folder that contains .7z PSX archives
###may need to chmod +x file to make executable
###uncomment below if required software not on system
#sudo apt-get install -y mame-tools p7zip-full
#extract 7z
for x7zFile in *.7z; do
gameName="$(basename "$x7zFile" .7z)"
echo "!!!!!!!!!!Extracting ${gameName}..."
7z x "${x7zFile}" -o./"${gameName}-tmp"
#convet to chd
echo "!!!!!!!!!!Converting ${gameName}..."
chdman createcd -i "./${gameName}-tmp/${gameName}cue" -o ./"${gameName}.chd"
#rm temporary directory
rm -R ./"${gameName}-tmp"
### uncomment below to rm the original 7z archive
# rm ./"$x7zFile"
echo "!!!!!!!!!!${gameName} complete..."
done
echo "All done."