Scripte zur Auswertung der von den Studierenden eingereichten git repositories
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
734 B

  1. #!/bin/bash
  2. if [ $# -eq 0 ]; then
  3. echo "creates a *.tex file for the name and matrikel number given"
  4. echo "and fetches the folder name of the latest checked out project."
  5. echo "usage:"
  6. echo " $0 Student Name from List MATRIKEL_NO"
  7. exit 1
  8. fi
  9. _args=( "$@" )
  10. MATRIKEL_NR=${_args[-1]}
  11. unset _args[${#_args[@]}-1]
  12. PROJECT_PATH=$(ls -1t ../../ProjektArbeiten/ | head -1)
  13. NAME="${_args[@]}"
  14. FILE_NAME=${NAME//[ ]/_}
  15. FILE_NAME=bewertung-${FILE_NAME//[,]/}.tex
  16. cp -v bewertung-student.tex $FILE_NAME
  17. sed -i -e "s/StudentsName} {}/StudentsName} {$NAME}/" $FILE_NAME
  18. sed -i -e "s/Matrikel}\( \)* {}/Matrikel}\1 {$MATRIKEL_NR}/" $FILE_NAME
  19. sed -i -e "s/in_der_Praxis\//in_der_Praxis\/$PROJECT_PATH/" $FILE_NAME