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.

16 lines
380 B

#!/bin/bash
[ -z "$COURSE" ] && echo "Needs a COURSE set" && exit 1
while read USER; do
echo -n "- $USER: "
if [ -d /course/$COURSE/assn/$USER ]; then
echo "exists, skipping"
continue
fi
mkdir /course/$COURSE/assn/$USER
chown -R $USER:$USER /course/$COURSE/assn/$USER
chmod o-rwx /course/$COURSE/assn/$USER
chgrp admin /course/$COURSE/assn/$USER
echo "created"
done