created file_to_link.sh

This commit is contained in:
2022-05-17 10:15:36 +02:00
parent 570d08aa8b
commit 23c4983371
3 changed files with 123 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
###uncomment below if required software not on system
#sudo apt-get install -y mame-tools p7zip-full
readonly cue="$1"
readonly destdir="$2"
# procesa el fitxer
readonly gameName="$(basename "$cue" .cue)"
if [ -f "${destdir}/${gameName}.chd" ]; then
echo -e "\e[1m\e[41m${gameName}.chd already exists\033[0m"
else
echo -e "\e[1m\e[41mProcessing ${gameName}...\033[0m"
chdman createcd -i "${cue}" -o "${destdir}/${gameName}.chd"
fi
echo "!!!!!!!!!!${gameName} complete..."