version 1.40.130 release
[feisty_meow.git] / scripts / rip_burn / blu_image.sh
1 #!/bin/bash
2
3 # make a dvd data disc image suitable for burning on bluray.
4
5 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
6
7 function show_usage()
8 {
9   echo "This script needs two parameters, (1) an ISO file to create, and"
10   echo "(2) a folder to use as the blu-ray data for the ISO.  For example,"
11   echo "  $(basename $0) ~/grunge.iso ~/dvdimages/grungebandpro"
12 }
13
14 iso_name="$1"; shift
15 folder_name="$1"; shift
16
17 if [ -z "$iso_name" -o -z "$folder_name" ]; then
18   show_usage
19   exit 3
20 fi
21
22 if [ -f "$iso_name" ]; then
23   echo -e "The ISO file must not already exist.\n"
24   show_usage
25   exit 3
26 fi
27
28 if [ ! -d "$folder_name" ]; then
29   echo -e "The provided folder name must exist.\n"
30   show_usage
31   exit 3
32 fi
33
34 genisoimage -r -J -joliet-long -o "$iso_name" "$folder_name"
35
36 exit_on_error generating ISO image from folder ${folder_name}
37