summaryrefslogtreecommitdiffstats
path: root/roles/obs/templates/intro
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-09-13 08:58:06 -0400
committerSacha Chua <sacha@sachachua.com>2023-09-13 08:58:24 -0400
commit077112b718eb29aecf331b1e703e7e90d8538e6c (patch)
tree5eab58517501dce8c79101bb7740c5000c506511 /roles/obs/templates/intro
parent366d6aec267f543f9a7b928778a09b80852346f3 (diff)
downloademacsconf-ansible-077112b718eb29aecf331b1e703e7e90d8538e6c.tar.xz
emacsconf-ansible-077112b718eb29aecf331b1e703e7e90d8538e6c.zip
add some more scripts, change 2022 to emacsconf_year
Diffstat (limited to 'roles/obs/templates/intro')
-rwxr-xr-xroles/obs/templates/intro8
1 files changed, 5 insertions, 3 deletions
diff --git a/roles/obs/templates/intro b/roles/obs/templates/intro
index 85ee895..7b5d4ab 100755
--- a/roles/obs/templates/intro
+++ b/roles/obs/templates/intro
@@ -5,17 +5,19 @@ if screen -list | grep -q background; then
screen -S background -X quit
fi
# Update the overlay
+SLUG=$1
FILE=$1
if [[ ! -f $FILE ]]; then
- LIST=(/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm)
+ LIST=(/data/emacsconf/assets/stream/emacsconf-{{ emacsconf_year }}-$FILE--*.webm)
FILE="${LIST[0]}"
BY_SLUG=1
+else
+ SLUG=$(echo "$FILE" | perl -ne 'if (/emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }')
fi
shift
-SLUG=$(echo "$FILE" | perl -ne 'if (/emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }')
overlay $SLUG
if [[ -f /data/emacsconf/assets/intros/$SLUG.webm ]]; then
mpv /data/emacsconf/assets/intros/$SLUG.webm
else
firefox /data/emacsconf/assets/in-between/$SLUG.png
-fi \ No newline at end of file
+fi