dvd2ogm-par.sh 380 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. #
  3. # dvd2ogm-par.sh IMAGE.ISO TITLE TITLE TITLE...
  4. #
  5. set -e
  6. nicelvl=19
  7. dvd2ogm="dvd2ogm.sh"
  8. image="$1"
  9. shift
  10. titles="$*"
  11. export PATH="$(pwd):$PATH"
  12. for title in $titles; do
  13. (
  14. mkdir "title-$title"
  15. cd "title-$title"
  16. nice -n$nicelvl $dvd2ogm "$image" "$title"
  17. cd ..
  18. mv "title-$title/out.ogm" "./title-$title.ogm"
  19. rmdir "title-$title"
  20. ) &
  21. done
  22. wait
  23. exit 0