Skip to content

Commit

Permalink
Merge pull request #27 from coltc50/master
Browse files Browse the repository at this point in the history
insert workdir option into comchap
  • Loading branch information
BrettSheleski authored Sep 27, 2018
2 parents 4e70309 + 8465f28 commit 0db73f1
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions comchap
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ deletelogo=true
deletetxt=true
verbose=false
lockfile=""
workdir=""

while [[ $# -gt 1 ]]
do
Expand Down Expand Up @@ -63,6 +64,10 @@ case $key in
lockfile="${key#*=}"
shift
;;
--work-dir=*)
workdir="${key#*=}"
shift
;;
*)
break
;;
Expand Down Expand Up @@ -107,11 +112,28 @@ outdir=$(dirname "$outfile")

outextension="${outfile##*.}"

edlfile="${infile%.*}.edl"
metafile="${infile%.*}.ffmeta"
logfile="${infile%.*}.log"
logofile="${infile%.*}.logo.txt"
txtfile="${infile%.*}.txt"
if [[ ! -z "$workdir" ]]; then
case "$workdir" in
*/)
;;
*)
comskipoutput="--output=$workdir"
workdir="$workdir/"
;;
esac
infileb=`basename "$infile"`
edlfile="$workdir${infileb%.*}.edl"
metafile="$workdir${infileb%.*}.ffmeta"
logfile="$workdir${infileb%.*}.log"
logofile="$workdir${infileb%.*}.logo.txt"
txtfile="$workdir${infileb%.*}.txt"
else
edlfile="$workdir${infile%.*}.edl"
metafile="$workdir${infile%.*}.ffmeta"
logfile="$workdir${infile%.*}.log"
logofile="$workdir${infile%.*}.logo.txt"
txtfile="$workdir${infile%.*}.txt"
fi

if [ ! -f "$edlfile" ]; then
$comskipPath --ini="$comskipini" "$infile"
Expand Down

0 comments on commit 0db73f1

Please sign in to comment.