diff --git a/blackatends b/blackatends index 8fd7dd87..64e43944 100755 --- a/blackatends +++ b/blackatends @@ -26,7 +26,7 @@ _usage(){ } [ "${#}" = 0 ] && _usage -# command-line options to set mediaid and original variables +# command-line options for help and invalid options OPTIND=1 while getopts ":h" OPT; do case "${OPT}" in diff --git a/checksumpackage b/checksumpackage index d514100c..874aa464 100755 --- a/checksumpackage +++ b/checksumpackage @@ -116,6 +116,7 @@ while [ "${*}" != "" ] ; do INDIR="." OUTDIR="." fi + #perform checking and verification if [ "${CHECK}" = "Y" ] ; then if [ -s "${PACKAGE}/${OUTDIR}/${DFXMLNAME}" ] ; then _check_dfxml "${PACKAGE}" @@ -152,6 +153,7 @@ while [ "${*}" != "" ] ; do continue fi fi + #create digital forensics xml and checksum.md5 file _report -dt "making Digital Forensics XML (${DFXMLNAME}) and (${CHECKSUMNAME}) for ${PACKAGE}" cd "${PACKAGE}/${INDIR}" DFXMLTMP=$(_maketemp) @@ -167,6 +169,7 @@ while [ "${*}" != "" ] ; do xml sel -T -t -m "/dfxml/fileobject" -v "hashdigest" -o " " -v "filename" -n "${PACKAGE}/${OUTDIR}/${DFXMLNAME}" > "${PACKAGE}/${OUTDIR}/${CHECKSUMNAME}" fi echo "$(_get_iso8601): $(basename "${0}"):${VERSION}: ${CHECKSUMNAME} is generated" >> "${PACKAGE}/${OUTDIR}/${CHECKSUMPROCESSLOG}" + #verify checksums by creating tmp checksum file and comparing with previously created checksums if [ "${VERIFY}" = "Y" ] ; then CHECKSUMCMP1=$(_maketemp) sort -k2 "${PACKAGE}/${OUTDIR}/${CHECKSUMNAME}" > "${CHECKSUMCMP1}" diff --git a/finishpackage b/finishpackage index 36bb755d..72b8565b 100755 --- a/finishpackage +++ b/finishpackage @@ -1,4 +1,5 @@ #!/bin/bash +#finish package takes a directory input created by restructureforCompliance and creates derivative access copies, metadata documents, and a checksum file. while [ "${*}" != "" ] ; do INPUT="${1}" makelossless "${INPUT}" && makebroadcast "${INPUT}" && makeyoutube "${INPUT}" && makemetadata "${INPUT}" && checksumpackage "${INPUT}" diff --git a/makebroadcast b/makebroadcast index 7b7126d9..81b5624d 100755 --- a/makebroadcast +++ b/makebroadcast @@ -38,7 +38,7 @@ _usage(){ } [ "${#}" = 0 ] && _usage -# command-line options to set mediaid and original variables +# command-line options to adjust volume, delivery location, and slate creation OPTIND=1 while getopts ":F:slrcv:o:d:e:E:nh" OPT ; do case "${OPT}" in @@ -180,7 +180,7 @@ while [ "${*}" != "" ] ; do else MIDDLEOPTIONS+=(-metadata:s:v:0 timecode=00:00:00.00) fi - # determine filter choice if set in capture.log and set in and out times if used + # determine filter choice if set in capture.log and set in and out times if used, ignore out time if a slate is being created. if [[ -f "${INGESTLOG}" && "${ISOBJECT}" = "Y" ]] ; then if [ "${FORMULA}" = "none" ] ; then FILTERCHOICE=$(_readingestlog "filter choice") diff --git a/makemetadata b/makemetadata index 280f1795..3eb95f4e 100755 --- a/makemetadata +++ b/makemetadata @@ -1,5 +1,5 @@ #!/bin/bash -# make metadata +# make metadata creates a set of metadata reports for an archival information package on all files in the objects subdirectory. VERSION="0.2" SCRIPTDIR=$(dirname "${0}") . "${SCRIPTDIR}/mmfunctions" || { echo "Missing '${SCRIPTDIR}/mmfunctions'. Exiting." ; exit 1 ;}; @@ -11,12 +11,13 @@ _usage(){ echo "$(basename "${0}") ${VERSION}" echo "Produces a set of metadata reports for an archival information package on all files in the objects subdirectory." echo "Usage: $(basename "${0}") [ -h ] package1 [ package2 ... ]" - echo " -h (show _usage)" + echo " -h (show usage)" + echo " -r deletes existing metadata files" exit } [ "${#}" = 0 ] && _usage -# command-line options to set mediaid and original variables +# command-line option to remove existing metadata files OPTIND=1 while getopts ":rh" OPT ; do case "${OPT}" in @@ -29,7 +30,6 @@ done shift $(( ${OPTIND} - 1 )) _set_up_filemeta(){ - # set up output _log -b if [[ -d "${PACKAGE_PATH}/${OUTPUTDIR}" && "${DELETEFILEMETA}" != "Y" ]] ; then _report -wt "WARNING ${PACKAGE_PATH}/${OUTPUTDIR} already exists, not making metadata." diff --git a/makemets b/makemets index 2be34d37..d0f89f54 100755 --- a/makemets +++ b/makemets @@ -122,7 +122,9 @@ echo " " > /tmp/makemets.xsl PWD=$(pwd) -cd "$1" +cd "${1}" +#create directory structure of AIP using tree, excluding tree file itself tree -DaNXs --du --timefmt "%Y-%m-%dT%H:%M:%SZ" -I "tree.xml" -I "mets.xml" . > /tmp/tree.xml +#use xslt to create mets document from tree.xml xsltproc --stringparam root "$(pwd)" /tmp/makemets.xsl /tmp/tree.xml | xml fo > "${1}/metadata/mets.xml" -cd "$PWD" +cd "${PWD}"