refactoring the directories, especially for scripts; moved gimp stuff out to db since...
[feisty_meow.git] / scripts / rip_burn / blu_image.sh
diff --git a/scripts/rip_burn/blu_image.sh b/scripts/rip_burn/blu_image.sh
new file mode 100644 (file)
index 0000000..8f22f2e
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+function show_usage()
+{
+  echo "This script needs two parameters, (1) an ISO file to create, and"
+  echo "(2) a folder to use as the blu-ray data for the ISO.  For example,"
+  echo "  $(basename $0) ~/grunge.iso ~/dvdimages/grungebandpro"
+}
+
+iso_name="$1"; shift
+folder_name="$1"; shift
+
+if [ -z "$iso_name" -o -z "$folder_name" ]; then
+  show_usage
+  exit 3
+fi
+
+if [ -f "$iso_name" ]; then
+  echo -e "The ISO file must not already exist.\n"
+  show_usage
+  exit 3
+fi
+
+if [ ! -d "$folder_name" ]; then
+  echo -e "The provided folder name must exist.\n"
+  show_usage
+  exit 3
+fi
+
+genisoimage -r -J -o "$iso_name" "$folder_name"
+