mirror of
https://github.com/linuxserver/emulatorjs.git
synced 2026-02-23 00:01:26 +08:00
add messages to chd and bin processing
This commit is contained in:
parent
76721388bd
commit
443c0b2fd5
@ -80,18 +80,22 @@ process_name () {
|
||||
}
|
||||
|
||||
process_chd () {
|
||||
echo "processing ${file}"
|
||||
mkdir -p "${user_folder}/hashes/${rom_path}/tmp"
|
||||
chdman extractcd -i "${user_folder}${rom_path}/${file}" -o "${user_folder}/hashes/${rom_path}/tmp/FILE.cue"
|
||||
# Check if file has a track 2
|
||||
if grep -q "TRACK 02" "${user_folder}/hashes/${rom_path}/tmp/FILE.cue"; then
|
||||
echo "${file} is multi track need to split"
|
||||
mkdir -p "${user_folder}/hashes/${rom_path}/tmp/split"
|
||||
binmerge -s "${user_folder}/hashes/${rom_path}/tmp/FILE.cue" FILE -o "${user_folder}/hashes/${rom_path}/tmp/split"
|
||||
echo "hashing ${file} (Track 1)"
|
||||
if [ -f "${user_folder}/hashes/${rom_path}/tmp/split/FILE (Track 1).bin" ]; then
|
||||
sum=$(sha1sum "${user_folder}/hashes/${rom_path}/tmp/split/FILE (Track 1).bin" | awk '{print $1;exit}')
|
||||
elif [ -f "${user_folder}/hashes/${rom_path}/tmp/split/FILE (Track 01).bin" ];then
|
||||
sum=$(sha1sum "${user_folder}/hashes/${rom_path}/tmp/split/FILE (Track 01).bin" | awk '{print $1;exit}')
|
||||
fi
|
||||
elif grep -q "TRACK 01" "${user_folder}/hashes/${rom_path}/tmp/FILE.cue"; then
|
||||
echo "hashing ${file}"
|
||||
sum=$(sha1sum "${user_folder}/hashes/${rom_path}/tmp/FILE.bin" | awk '{print $1;exit}')
|
||||
fi
|
||||
printf ${sum^^} > "${user_folder}/hashes/${rom_path}/${file}.sha1"
|
||||
@ -101,6 +105,7 @@ process_chd () {
|
||||
}
|
||||
|
||||
process_bin () {
|
||||
echo "processing ${file}"
|
||||
# Make sure we have a cue file
|
||||
cuefile=$(echo "${file}" | sed 's/.bin$/.cue/')
|
||||
if [ ! -f "${user_folder}/${rom_path}/${cuefile}" ]; then
|
||||
@ -109,14 +114,17 @@ process_bin () {
|
||||
fi
|
||||
# Check if file has a track 2
|
||||
if grep -q "TRACK 02" "${user_folder}/${rom_path}/${cuefile}"; then
|
||||
echo "${file} is multi track need to split"
|
||||
mkdir -p "${user_folder}/${rom_path}/tmp/"
|
||||
binmerge -s "${user_folder}/${rom_path}/${cuefile}" FILE -o "${user_folder}/${rom_path}/tmp/"
|
||||
echo "hashing ${file} (Track 1)"
|
||||
if [ -f "${user_folder}/${rom_path}/tmp/FILE (Track 1).bin" ]; then
|
||||
sum=$(sha1sum "${user_folder}/${rom_path}/tmp/FILE (Track 1).bin" | awk '{print $1;exit}')
|
||||
elif [ -f "${user_folder}/${rom_path}/tmp/FILE (Track 01).bin" ];then
|
||||
sum=$(sha1sum "${user_folder}/${rom_path}/tmp/FILE (Track 01).bin" | awk '{print $1;exit}')
|
||||
fi
|
||||
elif grep -q "TRACK 01" "${user_folder}/${rom_path}/${cuefile}"; then
|
||||
echo "hashing ${file}"
|
||||
sum=$(sha1sum "${user_folder}/${rom_path}/${file}" | awk '{print $1;exit}')
|
||||
fi
|
||||
printf ${sum^^} > "${user_folder}/hashes/${rom_path}/${file}.sha1"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user