add script to symlink to student numbers in current directory
This commit is contained in:
parent
ab8036a1bf
commit
d02519bbd0
1 changed files with 14 additions and 0 deletions
14
local/bin/subgit-symlinks
Executable file
14
local/bin/subgit-symlinks
Executable 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"
|
Loading…
Add table
Add a link
Reference in a new issue