Skip to content
Snippets Groups Projects
Verified Commit 0a32091c authored by jonahbeneb02's avatar jonahbeneb02
Browse files

Add fuclean script

This script deleted all the empty directories of students who have not
submitted anything (for example because there practice partners
submitted the assignment). Excluding those on the whiteboard web
interface does not help here, since then they are not part of the grade
table.
parent ee1ec7ac
No related branches found
No related tags found
No related merge requests found
#! /bin/sh
if [ ! -f 'grades.csv' ] && [ ! -f 'grades.xls' ]; then
printf "Execute within the directory containing 'grades.csv'\n" >&2
exit 1
fi
# Delete comments.txts so we can more easily delete empty directories.
# Otherwise they would still contain this one empty file.
find . -type f -name "comments.txt" -exec rm {} \;
# Delete all empty directories in the directory containing grades.csv
find . -type d -empty -delete
# Re-create the (now deleted) feedback attachment directories and comments.txts for the student directories that are left.
for dir in *; do
if [ -d "${dir}" ]; then
mkdir "${dir}/Feedback Attachment(s)"
touch "${dir}/comments.txt"
fi
done
#! /bin/sh
scripts="fixpdf.sh fucopy.sh fufixpdf.sh fuzip.sh fuxournalexport.sh fixtimes.sh"
scripts="fixpdf.sh fucopy.sh fufixpdf.sh fuzip.sh fuxournalexport.sh fixtimes.sh fuclean.sh"
destdir="${DESTDIR:=$HOME/.local/bin}"
mkdir -p "$destdir"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment