Skip to content

Instantly share code, notes, and snippets.

@haruo31
Created July 18, 2016 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haruo31/e8f955f7a2971e78539f3104d8303e17 to your computer and use it in GitHub Desktop.
Save haruo31/e8f955f7a2971e78539f3104d8303e17 to your computer and use it in GitHub Desktop.
wrapper script that creates ISO file via output of dvdbackup.
#!/bin/sh
set -xe
DRIVE=/dev/sr0
TARGET=`pwd`
TMP=`mktemp -d --suffix=dvdbackup -p $TARGET`
pushd $TMP
dvdbackup -M -i $DRIVE
APPNAME=`find . -maxdepth 1 -type d | tail -1 | xargs -I"{}" basename "{}"`
genisoimage -dvd-video -udf -A "$APPNAME" -o "${TARGET}/${APPNAME}.iso" "${APPNAME}"
popd
rm -rf $TMP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment