#!/bin/bash
# copy necessary chapters from tidb-course-101

srcpath="../tidb-course-101/student-guide/view/en2ja"

# The original 101 uses en2ja folder, but this 
destpath="student-guide/view/ja"
prefix="chapter-"
chapters=("01" "02" "03" "04" "05" "06" "07" "08")

# create dest if not exist
if [ ! -d ${destpath} ]; then
    mkdir -p ${destpath}
fi

for chapter in ${chapters[@]}; do
    rsync -r ${srcpath}/${prefix}${chapter} ${destpath}
done
