add script to symlink to student numbers in current directory

This commit is contained in:
Felix Van der Jeugt 2021-05-24 15:01:57 +02:00
parent ab8036a1bf
commit d02519bbd0
No known key found for this signature in database
GPG Key ID: 58B209295023754D
1 changed files with 14 additions and 0 deletions

14
local/bin/subgit-symlinks Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
# lines of form:
# Givenname Last Name (student number) <email address>
LIST="${LIST:-/data/courses/students.list}"
while read line; do
name="${line% (*}"
number="${line%) *}"
number="${number#* (}"
if [ -e "$number" ]; then
ln -s "$number" "$name"
fi
done < "$LIST"