Add platform-specific compression commands

This commit is contained in:
icenine451 2024-03-19 15:04:01 -04:00
parent b761fdd8d9
commit fc6ebecf79

View file

@ -10,11 +10,17 @@ compress_game() {
local dest_file=$(dirname "$(realpath "$file")")"/""$filename_no_extension" local dest_file=$(dirname "$(realpath "$file")")"/""$filename_no_extension"
if [[ "$1" == "chd" ]]; then if [[ "$1" == "chd" ]]; then
if [[ "$$3" =~ ^(psp)$ ]]; then case "$3" in # Check platform-specific compression options
/app/bin/chdman createdvd -i "$source_file" -o "$dest_file".chd "psp" )
else /app/bin/chdman createdvd --hunksize 2048 -i "$source_file" -o "$dest_file".chd -c zstd
;;
"ps2" )
/app/bin/chdman createdvd -i "$source_file" -o "$dest_file".chd -c zstd
;;
* )
/app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd /app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd
fi ;;
esac
elif [[ "$1" == "zip" ]]; then elif [[ "$1" == "zip" ]]; then
zip -jq9 "$dest_file".zip "$source_file" zip -jq9 "$dest_file".zip "$source_file"
elif [[ "$1" == "rvz" ]]; then elif [[ "$1" == "rvz" ]]; then