Course Management Scripts
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.

21 lines
483 B

#!/bin/bash
[ -z "$COURSE" ] && echo "Needs a COURSE set" && exit 1
chmod a+x /course
chmod a+x /course/$COURSE
chmod a+x /course/$COURSE/assn/
while read USER; do
echo -n "$USER: "
if [ ! -d /course/$COURSE/assn/$USER ] ; then
echo -e "\x1b[1;31mNot a directory\x1b[0m"
continue
fi
if [ -L /course/$COURSE/assn/$USER ] ; then
echo -e "\x1b[1;31mIs a link\x1b[0m"
continue
fi
setfacl -m u:$USER:rx /course/$COURSE/assn/$USER
ls -lad /course/$COURSE/assn/$USER
done