Skip to content

Commit 75ed102

Browse files
committed
remove trailing space
1 parent 18d4d03 commit 75ed102

20 files changed

+243
-244
lines changed

README.md

+145-145
Large diffs are not rendered by default.

checksum2filemaker

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ SCRIPTDIR=$(dirname "${0}")
77

88
# check environment
99
if [ -z "${FILEMAKER_DB}" ] ; then
10-
echo "The filemaker database must be set. Run mmconfig to set FILEMAKER_DB."
11-
_writeerrorlog "checksum2filemaker" "The filemaker database was not set, so the script was unable to run."
12-
exit 1
10+
echo "The filemaker database must be set. Run mmconfig to set FILEMAKER_DB."
11+
_writeerrorlog "checksum2filemaker" "The filemaker database was not set, so the script was unable to run."
12+
exit 1
1313
fi
14-
if [ -z "${FILEMAKER_XML_URL}" ] ; then
15-
echo "The filemaker xml path must be set. Run mmconfig to set FILEMAKER_XML_URL."
16-
_writeerrorlog "checksum2filemaker" "The filemaker xml path was not set, so the script was unable to run."
14+
if [ -z "${FILEMAKER_XML_URL}" ] ; then
15+
echo "The filemaker xml path must be set. Run mmconfig to set FILEMAKER_XML_URL."
16+
_writeerrorlog "checksum2filemaker" "The filemaker xml path was not set, so the script was unable to run."
1717
exit 1
1818
fi
1919

fix_volume

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ while [ "${*}" != "" ] ; do
5656
MIDDLEOPTIONS+=(-c:a pcm_s24be)
5757
MIDDLEOPTIONS+=(-ar 48000)
5858
MIDDLEOPTIONS+=(-ac 2)
59-
59+
6060
if [ "${CODEC_TAG_STRING}" = "mpeg" ] ; then
6161
EXTENSION="mxf"
6262
else

ingestfile

+8-8
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,15 @@ _ask_mediaid
201201

202202
## check for existing output
203203
if [ -d "${OUTDIR_INGESTFILE}/${MEDIAID}" ] ; then
204-
_report -wt "It looks like ${MEDIAID} was already ingested. If you want to overwrite the existing one please delete ${OUTDIR_INGESTFILE}/${MEDIAID} first and then try again."
205-
exit 1
204+
_report -wt "It looks like ${MEDIAID} was already ingested. If you want to overwrite the existing one please delete ${OUTDIR_INGESTFILE}/${MEDIAID} first and then try again."
205+
exit 1
206206
fi
207-
if [ -d "${AIP_STORAGE}/${MEDIAID}" ] ; then
208-
_report -wt "It looks like ${MEDIAID} was already ingested. If you want to overwrite the existing one please delete ${AIP_STORAGE}/${MEDIAID} first and then try again."
207+
if [ -d "${AIP_STORAGE}/${MEDIAID}" ] ; then
208+
_report -wt "It looks like ${MEDIAID} was already ingested. If you want to overwrite the existing one please delete ${AIP_STORAGE}/${MEDIAID} first and then try again."
209209
exit 1
210210
fi
211211
_ask_input
212-
#here is where we would insert an option for searching for directory.
212+
#here is where we would insert an option for searching for directory.
213213
if [ ! $(_is_video "${INPUT}") ] ; then
214214
_report -qnt "WARNING: ${INPUT} is not recognized as a video file. Please press q to quit, any other key to continue (if you know what you're doing): "
215215
read NOTVIDRESPONSE
@@ -382,7 +382,7 @@ fi
382382

383383

384384
# if the input is uncompressed, this will try and compress the file
385-
if [ "${PRESERVATION_MODE}" = "Y" ] ; then
385+
if [ "${PRESERVATION_MODE}" = "Y" ] ; then
386386
makelossless "${OUTDIR_INGESTFILE}/${MEDIAID}"
387387
fi
388388

@@ -436,7 +436,7 @@ if [ "${DOCHECKSUMS}" = "Y" ] ; then
436436
"${SCRIPTDIR}/checksumpackage" "${OUTDIR_INGESTFILE}/${MEDIAID}"
437437
fi
438438

439-
#make xml file of directory structure
439+
#make xml file of directory structure
440440
if [ "${MAKETREE}" = "Y" ] ; then
441441
"${SCRIPTDIR}/maketree" "${OUTDIR_INGESTFILE}/${MEDIAID}"
442442
fi
@@ -451,7 +451,7 @@ if [ "${DELIVERYTOAIPSTORAGE}" == "Y" ] ; then
451451
[ $(du -s "${OUTDIR_INGESTFILE}/${MEDIAID}" | awk '{print $1}') = "0" ] && rm -r "${OUTDIR_INGESTFILE}/${MEDIAID}"
452452
_report -dt "STATUS Done. Final package has been delivered to ${AIP_STORAGE}/${MEDIAID}"
453453
fi
454-
454+
455455
if [ "${CLEANUP_CHOICE}" == "Y" ] ; then
456456
if [ "${RSYNC_ERR}" -gt "0" ] ; then
457457
_report -wt "Cancelling requested deletion of source file, not looking safe."

makebroadcast

+3-4
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ while [ "${*}" != "" ] ; do
8484
INTIME=""
8585
OUTTIME=""
8686
audio_adjustment=""
87-
87+
8888
_unset_variables
8989
_get_broadcastduration "${SOURCEFILE}"
9090
_get_videostreamcount "${SOURCEFILE}"
@@ -124,7 +124,7 @@ while [ "${*}" != "" ] ; do
124124
echo "${SERIESTITLE}" > /tmp/slate_series.txt
125125
echo "${EPISODETITLE}" > /tmp/slate_episode.txt
126126
echo "${BROADCASTDURATION}" > /tmp/slate_duration.txt
127-
127+
128128
COLORBARS_SECS=60
129129
SLATE_SECS=20
130130
COUNTDOWN_SECS=8.2
@@ -174,7 +174,6 @@ while [ "${*}" != "" ] ; do
174174
MIDDLEOPTIONS+=(-ps 1)
175175
MIDDLEOPTIONS+=(-flags +ildct+ilme)
176176
MIDDLEOPTIONS+=(-pix_fmt yuv422p)
177-
178177

179178
#xdcam options
180179
MIDDLEOPTIONSXDCAM+=(-s 1920x1080)
@@ -328,7 +327,7 @@ scale=size=hd1080,format=yuv422p,setsar=1/1,setdar=16/9,fps=fps=ntsc[slate_v1];[
328327
[slate_v1][slate_stereo1][slate_mono1][slate_mono2][program_video][stereo1][mono1][mono2]concat=n=2:v=1:a=3[with_slate_video][with_slate_stereo1][with_slate_mono1][with_slate_mono2]"
329328
MIDDLEOPTIONS+=(-map "[with_slate_video]" -map "[with_slate_stereo1]" -map "[with_slate_mono1]" -map "[with_slate_mono2]")
330329
fi
331-
330+
332331
_filter_to_middle_option
333332
# MIDDLEOPTIONS+=(-metadata comment="INPUTOPTIONS: ${INPUTOPTIONS[@]}
334333
#FFMPEGINPUT: ${FFMPEGINPUT}

makedvd

+7-7
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ while [ "${*}" != "" ] ; do
8181

8282
# clear local arrays
8383
_unset_variables
84-
84+
8585
_get_videostreamcount "${SOURCEFILE}"
8686
_get_audiostreamcount "${SOURCEFILE}"
8787

@@ -120,13 +120,13 @@ while [ "${*}" != "" ] ; do
120120
MIDDLEOPTIONS+=(-lmax 200000)
121121
MIDDLEOPTIONS+=(-aspect "${ASPECT}")
122122
if [[ "${WIDTH}" == 720 && "${HEIGHT}" == 486 ]] ; then
123-
_add_video_filter "fieldorder=bff"
123+
_add_video_filter "fieldorder=bff"
124124
_add_video_filter "crop=720:480:0:4"
125125
_add_video_filter "setdar=${ASPECT}${TIMECODEOVERLAY}"
126126
elif [[ "${WIDTH}" == 720 && "${HEIGHT}" == 480 ]] ; then
127127
_add_video_filter "fieldorder=bff"
128128
_add_video_filter "setdar=${ASPECT}${TIMECODEOVERLAY}"
129-
elif [[ "${WIDTH}" == 720 && "${HEIGHT}" == 512 ]] ; then
129+
elif [[ "${WIDTH}" == 720 && "${HEIGHT}" == 512 ]] ; then
130130
_add_video_filter "fieldorder=bff"
131131
_add_video_filter "crop=720:480:0:32"
132132
_add_video_filter "setdar=${ASPECT}${TIMECODEOVERLAY}"
@@ -136,8 +136,8 @@ while [ "${*}" != "" ] ; do
136136
_add_video_filter "setdar=${ASPECT}${TIMECODEOVERLAY}"
137137
fi
138138
else
139-
_report -wt "You can't make a dvd from this file. Exiting."
140-
_writeerrorlog "makedvd" "The script was unable to create dvd from this file."
139+
_report -wt "You can't make a dvd from this file. Exiting."
140+
_writeerrorlog "makedvd" "The script was unable to create dvd from this file."
141141
exit 1
142142
fi
143143
if [[ "${AUDIOSTREAMCOUNT}" > 0 ]] ; then
@@ -153,9 +153,9 @@ while [ "${*}" != "" ] ; do
153153
else
154154
FFMPEGINPUT="${SOURCEFILE}"
155155
fi
156-
156+
157157
_filter_to_middle_option
158-
158+
159159
_run_critical ffmpeg ${INPUTOPTIONS[@]} -i "${FFMPEGINPUT}" ${MIDDLEOPTIONS[@]} "${OUTPUTDIR}/${MEDIAID%.*}.mpeg"
160160
# Making DVD VIDEO_TS folder, chapters every 5 minutes, dvdauthor will ignore chapter markers greater than duration
161161
export VIDEO_FORMAT=NTSC

makeflv

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ while [ "${*}" != "" ] ; do
114114
else
115115
FFMPEGINPUT="${SOURCEFILE}"
116116
fi
117-
117+
118118
_filter_to_middle_option
119-
119+
120120
_run_critical ffmpeg "${INPUTOPTIONS[@]}" -i "${FFMPEGINPUT}" "${MIDDLEOPTIONS[@]}" "${OUTPUT}"
121121
echo
122122
_summarize_make

makeframes

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ while [ "${*}" != "" ] ; do
6060
fi
6161
_add_video_filter "yadif"
6262
_add_video_filter "thumbnail=100"
63-
MIDDLEOPTIONS+=(-frames:v 1)
64-
63+
MIDDLEOPTIONS+=(-frames:v 1)
64+
6565
_filter_to_middle_option
6666

6767
_log -b
@@ -78,7 +78,7 @@ while [ "${*}" != "" ] ; do
7878
else
7979
FFMPEGINPUT="${SOURCEFILE}"
8080
fi
81-
81+
8282
_run_critical ffmpeg -y ${INPUTOPTIONS[@]} -v warning -ss "$START" -i "${FFMPEGINPUT}" "${MIDDLEOPTIONS[@]}" "${OUTPUT}"
8383
done
8484
echo

makelossless

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ while [ "${*}" != "" ] ; do
8181
if [ "${CODEC_TAG_STRING}" == "2vuy" -o "${CODEC_TAG_STRING}" == "v210" ] ; then
8282
_report -dt "${SOURCEFILENAME} is ${CODEC_TAG_STRING}, starting encode"
8383
_prep_ffmpeg_log
84-
84+
8585
_filter_to_middle_option
86-
86+
8787
_run_critical ffmpeg ${INPUTOPTIONS[@]} -i "${SOURCEFILE}" ${MIDDLEOPTIONS[@]} "${OUTPUTDIR}/${SOURCEFILENAME%.*}${SUFFIX}.mov" -f framemd5 -an "${LOGDIR}/${SOURCEFILENAME%.*}.framemd5"
8888
if [ "${CODEC_TAG_STRING}" == "2vuy" ] ; then
8989
_run_critical ffmpeg ${INPUTOPTIONS[@]} -i "${OUTPUTDIR}/${SOURCEFILENAME%.*}${SUFFIX}.mov" -f framemd5 -pix_fmt uyvy422 -an "${LOGDIR}/${SOURCEFILENAME%.*}${SUFFIX}.framemd5"

makemp3

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ while [ "${*}" != "" ] ; do
6767
_log -b
6868

6969
_set_up_output
70-
70+
7171
_unset_variables
72-
72+
7373
INPUTOPTIONS+=(-nostdin)
7474
MIDDLEOPTIONS+=(-map 0:a:0)
7575
MIDDLEOPTIONS+=(-ac 2)

makepodcast

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ while [ "${*}" != "" ] ; do
9393
else
9494
FFMPEGINPUT="${SOURCEFILE}"
9595
fi
96-
96+
9797
_filter_to_middle_option
98-
98+
9999
_run_critical ffmpeg "${INPUTOPTIONS[@]}" -i "${FFMPEGINPUT}" "${MIDDLEOPTIONS[@]}" "${OUTPUT}"
100100
echo
101101
_summarize_make

makeqctoolsreport

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ while [ "${*}" != "" ] ; do
3939
-show_versions \
4040
-of xml=x=1:q=1 \
4141
-noprivate | gzip > "${file}.qctools.xml.gz"
42-
42+
4343
echo
4444
echo "movie=${file}${moviefiltermap}${moviefilteroutput},\
4545
[v0]signalstats=stat=tout+vrep+brng,\
@@ -48,7 +48,7 @@ while [ "${*}" != "" ] ; do
4848
[b]field=bottom[b1],[a1][b1]psnr[out0]\
4949
${ebur128filters}"
5050
echo
51-
51+
5252
else
5353
echo "Error: $(basename '"${file}"' does not appear to have a video track, skipping.)"
5454
fi

makeresourcespace

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RELATIVEPATH="access/resourcespace"
1212
_usage(){
1313
echo
1414
echo "$(basename "${0}") ${VERSION}"
15-
echo "This application will create a high quality h264 file (suitable for uploading to YouTube) from a video file or package input with the following options."
15+
echo "This application will create a high quality h264 file (suitable for uploading to YouTube) from a video file or package input with the following options."
1616
echo "DEPENDENCIES: ${DEPENDENCIES[@]}"
1717
echo "Usage: $(basename "${0}") [ -d /path/to/deliver/to/ ] fileorpackage1 [ fileorpackage2 ...]"
1818
echo " -l (only use the left channel of the first audio track)"
@@ -122,9 +122,9 @@ while [ "${*}" != "" ] ; do
122122
else
123123
FFMPEGINPUT="${SOURCEFILE}"
124124
fi
125-
125+
126126
_filter_to_middle_option
127-
127+
128128
_run_critical ffmpeg "${INPUTOPTIONS[@]}" -i "${FFMPEGINPUT}" "${MIDDLEOPTIONS[@]}" "${OUTPUT}"
129129
echo
130130
_summarize_make

maketree

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ while [ "${*}" != "" ] ; do
77
# get context about the input
88
PACKAGE="${1}"
99
shift
10-
if [ -d "${PACKAGE}" ] ; then
10+
if [ -d "${PACKAGE}" ] ; then
1111
OUTPUTDIR="${PACKAGE}/metadata"
1212
if [ -s "${OUTPUTDIR}/tree.xml" ] ; then
1313
_report -dt "directory tree already exists, skipping for ${PACKAGE}"

makeyoutube

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ while [ "${*}" != "" ] ; do
119119
MIDDLEOPTIONS+=(-f mp4)
120120

121121
_prep_ffmpeg_log
122-
122+
123123
if [ "${CONCATSOURCE}" != "" ] ; then
124124
FFMPEGINPUT="${CONCATSOURCE}"
125125
else
126126
FFMPEGINPUT="${SOURCEFILE}"
127127
fi
128-
128+
129129
_filter_to_middle_option
130-
130+
131131
_run_critical ffmpeg "${INPUTOPTIONS[@]}" -i "${FFMPEGINPUT}" "${MIDDLEOPTIONS[@]}" "${OUTPUT}"
132132
echo
133133
_summarize_make

mmconfig

+4-4
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ if [[ "${RUNPASHUA}" == "Y" ]] ; then
240240
echo " FILEMAKER_XML_URL = ${FILEMAKER_XML_URL}"
241241
echo " VOLADJUST = ${VOLADJUST}"
242242
echo ""
243-
244-
#write to the config file
243+
244+
#write to the config file
245245
echo "OUTDIR_INGESTFILE=\"${OUTDIR_INGESTFILE}\"" > "${CONFIG_FILE}"
246246
echo "OUTDIR_INGESTXDCAM=\"${OUTDIR_INGESTXDCAM}\"" >> "${CONFIG_FILE}"
247247
echo "OUTDIR_PAPER=\"${OUTDIR_PAPER}\"" >> "${CONFIG_FILE}"
@@ -262,8 +262,8 @@ if [[ "${RUNPASHUA}" == "Y" ]] ; then
262262
echo "FILEMAKER_DB=\"${FILEMAKER_DB}\"" >> "${CONFIG_FILE}"
263263
echo "FILEMAKER_XML_URL=\"${FILEMAKER_XML_URL}\"" >> "${CONFIG_FILE}"
264264
echo "VOLADJUST=\"${VOLADJUST}\"" >> "${CONFIG_FILE}"
265-
else
266-
# set up configuration file using the command line
265+
else
266+
# set up configuration file using the command line
267267
echo "# $(basename ${CONFIG_FILE})" > "${CONFIG_FILE}"
268268
echo "# This configuration file contains variables used throughout ${WHAT_IS_THIS}." >> "${CONFIG_FILE}"
269269
echo "# Edit the lines below to form KEY=VALUE. Please do not add or remove the existing KEYs. Do not edit CONFIG_FILE_VERSION." >> "${CONFIG_FILE}"

mmfunctions

+10-10
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ _reset_directory(){
212212
_report -dt "I'm going to place the AIP in the same directory as the original input file."
213213
fi
214214
}
215-
215+
216216
_ask_intime(){
217217
# TIME_REGEX tests for either S.mmm or HH:MM:SS.mmm time formats where HH is two digit hour, MM is two digit minute, S is number of seconds, SS is two digit seconds, and .mmm is milliseconds from between 0 and 3 decimals
218218
TIME_REGEX="^\([0-9]\+\(\.[0-9]\{1,3\}\)\?\|[0-9]\{2\}:[0-5][0-9]:[0-5][0-9]\(\.[0-9]\{1,3\}\)\?\)$"
@@ -324,7 +324,7 @@ _get_seconds(){
324324
_email_delivery(){
325325
EMAILTO="${1}"
326326
if [ "${EMAILTO}" ] ; then
327-
_get_prettyduration "${OUTPUT}"
327+
_get_prettyduration "${OUTPUT}"
328328
if [[ -f "${INGESTLOG}" ]] ; then
329329
FROMLOG="Operator: $(_readingestlog "operator")\n
330330
Processing Computer: $(_readingestlog "computer_name")
@@ -424,11 +424,11 @@ _find_input (){
424424
[ -d "${1}" ] && [ -d "${1}/objects/service" ] && ISOBJECT="N" && SOURCEFILE=$(find "${1}/objects/service" -maxdepth 1 -mindepth 1 -type f \( -iname "*.mov" -o -iname "*.mxf" -o -iname "*.mp4" -o -iname "*.dv" -o -iname "*.mpeg" -o -iname "*.iso" -o -iname "*.mkv" -o -iname "*.m2ts" \) ! -name ".*" | head -n 1)
425425
[ -f "${1}" ] && SOURCEFILE="${1}"
426426
[ ! "${SOURCEFILE}" ] && [ -d "${1}/objects" ] && ISOBJECT="Y" && SOURCEFILE=$(find "${1}/objects" -maxdepth 1 -mindepth 1 -type f \( -iname "*.mov" -o -iname "*.mxf" -o -iname "*.mp4" -o -iname "*.dv" -o -iname "*.mpeg" -o -iname "*.iso" -o -iname "*.mkv" -o -iname "*.m2ts" \) ! -name ".*" | head -n 1)
427-
if [ ! "${SOURCEFILE}" ] ; then
427+
if [ ! "${SOURCEFILE}" ] ; then
428428
_report -wt "A valid source file isn't found."
429-
_writeerrorlog "_find_input" "A valid source file was not found, so the script could not proceed."
429+
_writeerrorlog "_find_input" "A valid source file was not found, so the script could not proceed."
430430
exit 1
431-
fi
431+
fi
432432
LOG+="SOURCEFILE: ${SOURCEFILE}\n"
433433
if [ "${SOURCEFILE#*.}" == "iso" ] ; then
434434
_report -dt "Detecting iso input and hoping its a dvd image"
@@ -711,7 +711,7 @@ _free_space(){
711711
local SPACE="${1}" #This value represents the space in gigabytes required for the script to run
712712
local OUTPUTDIR="${2}"
713713
if [ ! -d "${OUTPUTDIR}" ] ; then
714-
_report -wt "The output directory [${OUTPUTDIR}] that free-space function is seeking does not exist."
714+
_report -wt "The output directory [${OUTPUTDIR}] that free-space function is seeking does not exist."
715715
exit 1
716716
fi
717717
[[ ! "${SPACE}" =~ ^-?[0-9]+$ ]] && { _report -wt "Number is not an integer." ; exit 1 ;};
@@ -824,9 +824,9 @@ _prep_volume_adjustment(){
824824
_filter_to_middle_option(){
825825
if [ -n "${VIDEOFILTERCHAIN}" -a -n "${AUDIOFILTERCHAIN}" ] ; then
826826
MIDDLEOPTIONS+=(-filter_complex ${VIDEOFILTERCHAIN}\;${AUDIOFILTERCHAIN})
827-
elif [ -n "${VIDEOFILTERCHAIN}" ] ; then
827+
elif [ -n "${VIDEOFILTERCHAIN}" ] ; then
828828
MIDDLEOPTIONS+=(-filter_complex ${VIDEOFILTERCHAIN})
829-
elif [ -n "${AUDIOFILTERCHAIN}" ] ; then
829+
elif [ -n "${AUDIOFILTERCHAIN}" ] ; then
830830
MIDDLEOPTIONS+=(-filter_complex ${AUDIOFILTERCHAIN})
831831
fi
832832
}
@@ -879,15 +879,15 @@ _pashua_run() {
879879
fi
880880
else
881881
ENCODING=""
882-
882+
883883
# Get result
884884
RESULT=`"${PASHUAPATH}" ${ENCODING} ${PASHUA_CONFIGFILE} | sed 's/ /;;;/g'`
885885

886886
# Parse result
887887
for LINE in ${RESULT}
888888
do
889889
KEY=`echo ${LINE} | sed 's/^\([^=]*\)=.*$/\1/'`
890-
VALUE=`echo ${LINE} | sed 's/^[^=]*=\(.*\)$/\1/' | sed 's/;;;/ /g'`
890+
VALUE=`echo ${LINE} | sed 's/^[^=]*=\(.*\)$/\1/' | sed 's/;;;/ /g'`
891891
VARNAME="${KEY}"
892892
VARVALUE="${VALUE}"
893893
eval $VARNAME='$VARVALUE'

0 commit comments

Comments
 (0)