diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-05-10 11:49:53 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-05-10 11:50:03 +0200 |
commit | 8ce792ce5199156f306bd1f9c23c8c3ea8c4712b (patch) | |
tree | 652b100c9de0385ef53522e36dc32fe17588bce6 /bin | |
parent | c7c851faaaf98c3e17ecc017f10eb6f134afb997 (diff) |
Fix resolve paths from BASESTEM (renamed from misnamed BASEPATH).
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/livedump | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/livedump b/bin/livedump index 3120aff..6e4c0b8 100755 --- a/bin/livedump +++ b/bin/livedump @@ -1,6 +1,6 @@ #!/bin/sh # -# Usage: livedump [FORMAT [BASEPATH [SESSIONPATTERN [SEGMENTPATTERN]]]] +# Usage: livedump [FORMAT [BASESTEM [SESSIONPATTERN [SEGMENTPATTERN]]]] # # Patterns are fed through "date +PATTERN" # @@ -21,7 +21,7 @@ set -eu FORMAT=${1:-dv} -BASEPATH=${2:-./dump} +BASESTEM=${2:-./dump} SESSIONPATTERN=${3:-/%Y%m%d/%H%M%S} SEGMENTPATTERN=${4:-/%H%M%S} @@ -34,16 +34,16 @@ case $FORMAT in ;; esac -LINKPATH="$LINKSTEM.$SUFFIX" +LINKPATH="$BASESTEM.$SUFFIX" SESSIONSTEM=$(date +"$TARGETPATTERN") -SESSIONPATH="$SESSIONSTEM.$SUFFIX" +SESSIONPATH="$BASESTEM$SESSIONSTEM.$SUFFIX" mkdir -p "$(dirname "$LINKPATH" "$SESSIONPATH")" touch "$SESSIONPATH" [ -z "$LINKPATH" ] | ln -fs "$SESSIONPATH" "$LINKPATH" while true; do SEGMENTSTEM=$(date +"$SEGMENTPATTERN") - LOGPATH="$BASEPATH$SESSIONSTEM$SEGMENTSTEM.log" + LOGPATH="$BASESTEM$SESSIONSTEM$SEGMENTSTEM.log" mkdir -p "$LOGPATH" FFREPORT="file=$LOGPATH" \ ffmpeg -hide_banner "$@" pipe: \ |