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