#!/bin/bash # # Note: the pathspec does not have the semantics of unix 'cp'. # # * FILE: placed in the root directory. # * DIRECTORY: the CONTENTS are placed in the root directory. # # To copy a directory, you need to move the root dir. # # dvd init|add -root dirname dirname # usage () { echo "usage:" echo " `basename $0` init|add [options ...] [pathspec ...]" echo " `basename $0` video [options ...] " } [ -z "$2" ] && usage && exit 1 unset SUDO_COMMAND export MKISOFS=/usr/bin/mkisofs CMD=$1 shift # DEV=/dev/scd0 # DEV=/dev/dvd # DEV=/dev/sr0 DEV=/dev/sr1 SPEED=-speed=1 ARGS="$DEV $SPEED -r -J -joliet-long" add () { growisofs -M $ARGS "$@" } init () { growisofs -Z $ARGS "$@" } video () { growisofs -dvd-compat -Z $DEV=$1 $SPEED } $CMD "$@"