#!/bin/sh
set -e

case "$1" in
    "libreoffice")
        for presi in revealjs/*/handout.odt; do
            make "$(dirname $presi)/handout.pdf"
        done
        ;;
    "revealjs")
        for presi in revealjs/*/index.md; do
            make "$(dirname $presi)/index.html"
        done
        ;;
    "decktape")
        for presi in revealjs/*/index.html; do
            make "$(dirname $presi)/index.pdf"
        done
        ;;
    *)
        echo "unknown mode"
        ;;
esac
