Compare commits

4 Commits

Author SHA1 Message Date
5d18db5fd9 Update 'readme.md' 2023-02-20 16:58:35 +00:00
1ec0b97de1 modified: convert_to_gdi_then_to_chd.sh
new file:   docker_command.sh
	modified:   get-gdi-conversion.sh
2023-02-20 10:47:06 -06:00
379b4199b8 no message 2023-02-20 09:13:44 -06:00
ef59cf1895 no message 2023-02-20 09:07:55 -06:00
4 changed files with 65 additions and 1 deletions

View File

@@ -0,0 +1,52 @@
#!/bin/bash
# Date: 02/13/2023
# Author: Anthony Correa
# I used this script to batch archive bin/cues to CHD.
# It will create a file based on the folder file name
# It should automatically skip if there is a folder already in the output directory
# Usage: $ ./convert_cue_chd.sh <input_directory>
# for example, to use a directory with wildcards:
# use with convert_cue_chd.sh */.
# output_directory is the directory where the unarchived folders will go
output_directory=../out
mkdir -p "$output_directory"
i=1
for FOLDER in "$@";
do
##echo "$fi"
echo $'\n'"=="`printf %03d $i`"/"`printf %03d $#`"============================================================================="
echo "Input folder: $FOLDER"
infiles=("$FOLDER"/*.cue)
for INFILE in "$infiles";do
filename=$(basename -- "$INFILE")
outname="${filename%.*}.chd"
outpath="$output_directory/$outname"
##touch "./out/${fi%%.*}.new"
if [ ! -f "$outpath" ]; then
echo "Input file: $filename"
echo "Output path: $outpath"
echo $'\n'
./gdi-conversion-linux -c "$INFILE"
chdman createcd -i "$FOLDER/output/disc.gdi" -o "$outpath"
rm -r "$FOLDER/output"
else
echo "$outpath exists... skipping"
fi
done
((i+=1))
done
echo "======================================================================================"
echo $'\n'
echo "Done converting"
# at one point I wanted to tar the results to make it easier to transfer all the contents
# but i changed my mind, so i commented it out. this is here in case i change my mind again.
#echo "now tarring"
#tar -cvf out.tar "$output_directory"
echo "Done!"

1
docker_command.sh Normal file
View File

@@ -0,0 +1 @@
docker exec -d -w "/volume2/chd-conversion" python sh -c "./convert_to_gdi_then_to_chd.sh ../dc-out/Tony\ Hawk*/ > log.txt"

10
get-gdi-conversion.sh Normal file
View File

@@ -0,0 +1,10 @@
# Date: 02/20/2023
# Author: Anthony Correa
# This script will download the v1.2.0 release of gdi-conversion
# it can then be used as gdi-conversion-linux -c ./MyUser/
# https://github.com/sirconan/gdi-conversion
# Usage: $ ./get-gdi-conversion.sh
wget https://github.com/sirconan/gdi-conversion/releases/download/1.2.0/gdi-conversion-linux-v1.2.0 -O gdi-conversion-linux
chmod +x gdi-conversion-linux

View File

@@ -2,4 +2,5 @@ Scripts used in Feb 2023 to do change some CD file formats. They were original 7
I took some inspiration from
- [reddit](https://www.reddit.com/r/RetroPie/comments/wgq4eu/comment/ij9krit/)
- [nickheyer/CHDconvert](https://github.com/nickheyer/CHDconvert)
- [nickheyer/CHDconvert](https://github.com/nickheyer/CHDconvert)
- [sirconan/gdi-conversion](https://github.com/sirconan/gdi-conversion)