#!/bin/bash # Blu-Ray archival # by Marc, October 2019 updates and corrections from November 2017 # There's no magic in this; you have to keep this script updated # with the data that needs to be burned and what volumes they are # to be contained on. # For diagnostic and pipelining purposes, this script separates # the preparation and burning functions. You can do everything # serially in one bash instance, or you can prep one disc while # burning an already-prepped disc with two bash instances, # provided you have enough scratch space for both images. # These directories can be tweaked locally. BASEDIR=/media/me/2017.001/scans BIGTEMPDIR=/data # Documentation. help () { cat <DIGESTS popd # experiment if false; then echo echo You may view the mounted image now before continuing, then type echo " kill -CONT" $BASHPID echo kill -STOP $BASHPID fi # unmount image and free loop device sudo umount $LOOP sudo losetup -d $LOOP fi # burn: dd UDF image onto optical medium if [[ $DO_BURN ]]; then date +"Starting burn at %H:%M" growisofs -Z /dev/sr0=$IM echo Please label the newly-burned $DISC, containing: for a in $DIRS_ON_DISC; do echo " "$a; done fi if [[ $DO_PREP || $DO_BURN ]]; then date +"Complete at %H:%M" fi # if [[ $DO_FREE ]]; then rm -rf $IM $MNT fi exit 0