mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1014 B

  1. #!/bin/bash
  2. . scripts/functions
  3. if [ ! -e .config ] ; then
  4. echo "${bold}${red}No configuration found!${normal}"
  5. echo "Run ./config.sh first!"
  6. exit 1
  7. fi
  8. . .config
  9. for x in create_lvpxml encrypted plain ; do
  10. . scripts/${x}
  11. done
  12. moviefiles="/tmp/lvp_moviefiles.${$}"
  13. trap "rm -f ${moviefiles}" EXIT
  14. trap "exit 1" INT
  15. case "${LVP_SIZE}" in
  16. cd)
  17. size=700
  18. ;;
  19. dvd)
  20. size=4486
  21. ;;
  22. other)
  23. size=${LVP_SIZE_OTHER}
  24. ;;
  25. esac
  26. if ! eval "type=\${type_${LVP_TYPE}}" ; then
  27. echo "${bold}${red}Unknown type ${LVP_TYPE}${normal}"
  28. exit 1
  29. fi
  30. mplayer_param=${LVP_MPLAYER_OPTS}
  31. eval "for x in ${LVP_FILES} ; do echo \${x} ; done" >${moviefiles}
  32. echo "Verifying existence of files ... "
  33. error=0
  34. while read file ; do
  35. if [ ! -f "${file}" ] ; then
  36. echo "${file}: no such file or directory"
  37. error=$(( ${error} + 1 ))
  38. fi
  39. done < ${moviefiles}
  40. if [ ${error} -gt 0 ] ; then
  41. echo "Couldn't find ${error} file(s)."
  42. confirm "Continue without those files"
  43. [ ${?} -eq 1 ] && exit 1
  44. fi
  45. eval "process_${LVP_TYPE}"