Created
July 18, 2016 11:29
-
-
Save haruo31/e8f955f7a2971e78539f3104d8303e17 to your computer and use it in GitHub Desktop.
wrapper script that creates ISO file via output of dvdbackup.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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