blob: 8fdca72eef1d086f96c0d74d263116b383092207 (
plain) (
tree)
|
|
#!/bin/bash
# {{ ansible_managed }}
ORIGINAL=$1
REENCODED=$(echo "$ORIGINAL" | perl -pe 's/^(emacsconf-[0-9]*-.*?--.*?--.*?--).*/$1reencoded.webm/')
SLUG=$(echo "$ORIGINAL" | perl -ne '/^emacsconf-[0-9]*-(.*?)--/ && print $1')
MAIN=$(echo "$ORIGINAL" | perl -pe 's/^(emacsconf-[0-9]*-.*?--.*?--.*?--).*/$1main.webm/')
SCREEN=reencode-$SLUG
if ! ( screen -ls | grep -q $SLUG ); then
screen -dmS $SCREEN
fi
( cd /data/emacsconf/cache; ./update-cache )
# /data/emacsconf/2022/scripts/update-task-status.sh $SLUG "WAITING_FOR_PREREC" "PROCESSING"
#if [[ ! -f "$REENCODED" ]]; then
screen -S $SCREEN -X screen -t reencode-$SLUG /bin/bash -c "/data/emacsconf/2022/scripts/reencode.sh \"$ORIGINAL\" \"$REENCODED\" && /data/emacsconf/2022/scripts/upload.sh $REENCODED $MAIN && /data/emacsconf/2022/scripts/thumbnail.sh \"$MAIN\" && /data/emacsconf/2022/scripts/upload.sh $(echo "$MAIN" | sed s/webm$/png/) exec /bin/bash" &
#fi
screen -S $SCREEN -X screen -t captions-$SLUG /bin/bash -c "/data/emacsconf/2022/scripts/process-captions.py $(dirname $ORIGINAL); /data/emacsconf/2022/scripts/update-task-status.sh $SLUG PROCESSING TO_ASSIGN; exec /bin/bash"
screen -x $SCREEN
|