Files
bin/dvd-burn-files
2012-12-16 18:46:30 +01:00

25 lines
477 B
Plaintext
Executable File

set -x
. /etc/dvd-scripts.env
DVD_DIR=$1
echo "Verzeichnis $DVD_DIR auf DVD brennen..."
MAX_SIZE=4702989182
# DVD-Size 4,702,989,182
size=`du -sb "$DVD_DIR" | awk '{print $1}'`
#printf "size: %4d MB\n" `expr $size \/ 1024 \/ 1024`
printf "size: %4d MB\n" `echo "$size/1024/1024;" | bc `
if [ $size -gt $MAX_SIZE ]
then
printf "Zu Groß (max: %4d MB) !!!\n" `expr $MAX_SIZE \/ 1024 \/ 1024`
else
growisofs -Z $DVD_DEVICE -R -J $DVD_DIR
fi
sleep 1
echo Fertig.
eject