#!/bin/bash

# Language
L=${1}

# Team tag
TEAM=pe

# PPTX template path
[[ ! -z ${3} ]] && T=${3} || T=./template/template-${TEAM}-background-white-${L}.pptx

mkdir -p ./stage 2>>/dev/null

python -m pingcap.pe.flash.cmd_pack_course ${T} ${L} ${TEAM} true

DEST_FILE=`basename $(pwd)`

# Generate the PDF as well.
#if [[ $OSTYPE == "darwin"* ]]; then 
#    ppt2pdf-macos.sh ./stage/${DEST_FILE}-${L}.pptx
#fi;

open ./stage/${DEST_FILE}-${L}-inspected.pptx
