#!/bin/sh

if [ -z "$1" ]
then
  echo "Usage: $0 <root-path> [<recorder-device>]"
  exit 1
fi

path="$1"
[ -n "$2" ] && dev="dev=$2"

mkisofs -pad -l -r -J -hide-rr-moved -no-emul-boot -boot-load-size 4 \
        -boot-info-table -b boot/isolinux/isolinux.bin \
        -c boot/isolinux/boot.cat -A Knoppicillin "$path" \
  | cdrecord -eject -v "$dev" -
