#! /bin/bash 

repo="https://github.com/JorgeStolfi/Projeto-MC857-2020-1"

# Get student IDs:
rasfile="${HOME}/cursos/mc857/2020-1/listas/ras.txt"
ras=( `cat ${rasfile} | egrep -e '^[0-9][0-9][0-9][0-9][0-9][0-9]([ #]|$)' | sort` )

for ra in ${ras[@]}; do
  echo "=== creating branch ${ra} ==="
  svn copy "${repo}/trunk" "${repo}/branches/${ra}" -m "copia de trabalho de ra${ra}"
  sleep 3
done
