These instructions assume the bash shell, running commands on the gl.umbc.edu linux server.
CLASS=<class-name> REPO=<full-base-path-for-repositories> WORK=<full-path-for-private-copies> TA=<TA-userid>
mkdir $REPO # create list of students in $REPO/students.txt
pts creategroup $USER:$CLASS pts adduser -group $USER:$CLASS -user $(<$REPO/students.txt)
fs sa -dir $REPO -acl system:anyuser none $USER:$CLASS read $TA write
git init --bare $REPO/TEMPLATE.git find $REPO/TEMPLATE.git -type d -exec fs sa -acl $USER:$CLASS none -dir '{}' +
mkdir $WORK cd $WORK git clone $REPO/TEMPLATE.git cd TEMPLATE echo "This is your class submission repository" > README.txt git add . git commit -m "Initial commit" git push --all
cd $REPO for i in $(<$REPO/students.txt); do \ git clone --bare TEMPLATE.git $i.git; find $i.git -type d -exec fs sa -acl $i write $USER:$CLASS none -dir '{}' +; done
STUDENT=userID cd $REPO pts adduser -user $STUDENT -group $USER:$CLASS echo $STUDENT >> students.txt git clone --bare TEMPLATE.git $STUDENT.git find $STUDENT.git -type d -exec fs sa -acl $STUDENT write $USER:$CLASS none -dir '{}' +
cd $WORK for i in $REPO/*.git; do git clone $i; done
cd $WORK/TEMPLATE # sample of content to push mkdir assn{1,2,3,4,5,6} touch assn{1,2,3,4,5,6}/.gitignore # probably would want to add more actual content git add . git commit -m "new assignment content" git push
cd $WORK for i in $(<$REPO/students.txt); do (cd $i; git pull; git pull ../TEMPLATE master; git push) done