summaryrefslogtreecommitdiffstats
path: root/roles/prerec/templates/get-file-prefix
blob: 0240b993879e6745aa5c8fc56df9d4156e487661 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
# {{ ansible_managed }}
# Usage: get-file-prefix $slug [talks.json]
# You can also set the TALKS_JSON environment variable

SLUG=$1
if [ -z "$TALKS_JSON" ]; then
  TALKS_JSON=${2:-~orga/current/talks.json}
fi
jq -r '.talks[] | select(.slug=="'$SLUG'")["file-prefix"]' < $TALKS_JSON