From a3e38e49b7eff4cd1b9999b0a23a737eccf619fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tine=20S=C3=B8rensen?= Date: Thu, 29 Dec 2016 20:22:10 +0100 Subject: [PATCH] Fixed #20 and #22, though MLV to DNG lags after completion. Also, fixed mkrelease.sh to work with 2.0.1 as opposed to the modularization branch. #22 fix is quite sloppy (-oP replaced with -E). --- convmlv.sh | 8 ++++---- mkrelease.sh | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/convmlv.sh b/convmlv.sh index 738466e..f380e5d 100755 --- a/convmlv.sh +++ b/convmlv.sh @@ -66,7 +66,7 @@ INPUT_ARGS=$(echo "$@") #The original input argument string. if [[ $OSTYPE == "linux-gnu" ]]; then THREADS=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | tail -1) -elif [[ $OSTYPE == "darwin11" ]]; then +elif [[ $OSTYPE == "darwin11" || $OSTYPE == "darwin15" ]]; then THREADS=$(sysctl -n hw.ncpu) else THREADS=4 @@ -119,7 +119,7 @@ setDefaults() { #Set all the default variables. Run here, and also after each AR MAN_DEPS="mlv_dump raw2dng cr2hdr mlv2badpixels.sh balance.py sRange.py color-core" if [[ $OSTYPE == "linux-gnu" ]]; then PYTHON="python3" - elif [[ $OSTYPE == "darwin11" ]]; then + elif [[ $OSTYPE == "darwin11" || $OSTYPE == "darwin15" ]]; then PYTHON="python3" else PYTHON="python" @@ -1486,7 +1486,7 @@ mlvSet() { ISO=`echo "$camDump" | grep 'ISO' | sed 's/[[:alpha:] ]*: //' | cut -d$'\n' -f2` APERTURE=`echo "$camDump" | grep 'Aperture' | sed 's/[[:alpha:] ]*: //' | cut -d$'\n' -f1` LEN_FOCAL=`echo "$camDump" | grep 'Focal Len' | sed 's/[[:alpha:] ]*: //' | cut -d$'\n' -f1` - SHUTTER=`echo "$camDump" | grep 'Shutter' | sed 's/[[:alpha:] ]*: //' | grep -oP '\(\K[^)]+' | cut -d$'\n' -f1` + SHUTTER=`echo "$camDump" | grep 'Shutter' | sed 's/[[:alpha:] ]*: //' | grep -E '\(\K[^)]+' | cut -d$'\n' -f1` REC_DATE=`echo "$camDump" | grep 'Date' | sed 's/[[:alpha:] ]*: //' | cut -d$'\n' -f1` REC_TIME=`echo "$camDump" | grep 'Time: [0-2][0-9]\:*' | sed 's/[[:alpha:] ]*: //' | cut -d$'\n' -f1` KELVIN=`echo "$camDump" | grep 'Kelvin' | sed 's/[[:alpha:] ]*: //' | cut -d$'\n' -f1` @@ -1886,7 +1886,7 @@ for ARG in "${FILE_ARGS_ITER[@]}"; do #Go through FILE_ARGS_ITER array, copied f $2 $3 $4 -o "${tmpOut}/${9}_" -f ${range} $6 --dng --batch | { #mlv_dump command. Uses frame range. lastCur=0 while IFS= read -r line; do - output=$(echo $line | grep -Po 'V.*A' | cut -d':' -f2 | cut -d$' ' -f1) #Hacked my way to the important bit. + output=$(echo $line | grep -E 'V.*A' | cut -d':' -f2 | cut -d$' ' -f1) #Hacked my way to the important bit. if [[ $output == "" ]]; then continue; fi #If there's no important bit, don't print. cur=$(echo "$output" | cut -d'/' -f1) #Current frame. diff --git a/mkrelease.sh b/mkrelease.sh index 7e61275..c6adeb2 100755 --- a/mkrelease.sh +++ b/mkrelease.sh @@ -11,18 +11,16 @@ VERSION=$(echo "$(./convmlv.sh -v)" | sed -e 's/\./\_/g') ## It's reccommended that BINPATH is a folder in REP_PATH. REP_PATH="$(pwd)" -BINPATH="${REP_PATH}/binaries" RELEASE="${REP_PATH}/release" mkdir -p "$RELEASE" if [[ $OSTYPE == "linux-gnu" ]]; then PLATFORM="linux" -elif [[ $OSTYPE == "darwin11" ]]; then +elif [[ $OSTYPE == "darwin11" || $OSTYPE == "darwin15" ]]; then PLATFORM="mac" else echo "Platform not yet supported! Contact me at contact@sofusrose.com." fi -cd "$BINPATH" -tar -czvf $RELEASE/convmlv-${VERSION}-${PLATFORM}.tar.gz ../balance.py mlv2badpixels.sh mlv_dump raw2dng cr2hdr ../sRange.py ../CHANGELOG ../licence ../convmlv.sh ../color-core/ ../color-ext ../DEPENDENCIES ../docs/MANPAGE ../docs/docs.pdf ../docs/workflow.txt ../configs/* +tar -czvf $RELEASE/convmlv-${VERSION}-${PLATFORM}.tar.gz balance.py mlv2badpixels.sh mlv_dump raw2dng cr2hdr sRange.py CHANGELOG licence convmlv.sh color-core/ color-ext DEPENDENCIES docs/MANPAGE docs/docs.pdf docs/workflow.txt configs/*