make_library_conversion_script.sh 691 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # in the directory with all the 7z archives, make a folder and cd into it. then clone the ssrptc git repo here
  3. # now run this script to generate a script that will extract and convert the files to ccd/img/sub format.
  4. # you can keep a log with:
  5. echo "#!/bin/bash" > unar_script.sh
  6. echo "set -x -e" >> unar_script.sh
  7. echo "exec > >(tee -a unar_script.log) 2>&1" >> unar_script.sh
  8. SAVEIFS=$IFS
  9. IFS=$(echo -en "\n\b")
  10. for i in $(LANG=C; find .. -type f -name "*.7z" -exec basename {} '.7z' \; | sort); do
  11. echo "unar \"../$i.7z\"; cd \"$i\"; ../ssrptc/cue2ccd.py \"$i.cue\"; ../ssrptc/bin2img.sh; rm *.bin; cd .."
  12. done >> unar_script.sh
  13. IFS=$SAVEIFS
  14. chmod +x unar_script.sh