Skip to content

Instantly share code, notes, and snippets.

@brockers
Created November 1, 2018 02:41
Show Gist options
  • Save brockers/ba829bdacbf12a9ec9bc62b3c070f8c2 to your computer and use it in GitHub Desktop.
Save brockers/ba829bdacbf12a9ec9bc62b3c070f8c2 to your computer and use it in GitHub Desktop.
Quick script to compile all students software
#!/bin/bash
MAIN=$(pwd)
for NAME in */; do
echo "==== Processing user $NAME ======"
cd "$NAME"
for PROJECT in */; do
if [[ -d "$PROJECT" ]]; then
echo "Compiling $PROJECT"
cd "$PROJECT" &&
javac ./*.java
cd "$MAIN" && cd "$NAME"
fi
done
cd "$MAIN"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment