-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmit.sh
More file actions
executable file
·64 lines (48 loc) · 1.24 KB
/
Copy pathsubmit.sh
File metadata and controls
executable file
·64 lines (48 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
source "$(dirname "$0")/prerequisites.sh"
if ! runningOnPSUMachine; then
echo "** This script can only be run on a PSU CECS Linux Machine"
exit 1
fi
if [ $# -lt 1 ]; then
echo "** You must specify a project name"
exit 1
fi
if ! checkForJava; then
echo "** Java is not configured correctly in your environment"
exit 1
fi
project=$1
submitClass="Submit"
mavenGoals="clean verify"
srcDirectory="src"
if [[ "$project" == "Project0" ]]; then
directory="student"
elif [[ "$project" == "koans" ]]; then
directory="koans"
mavenGoals="clean exec:java"
elif [[ "$project" == "Project5" ]]; then
directory="airline-web"
elif [[ "$project" == "Project6" ]]; then
directory="airline-android"
submitClass="SubmitAndroidProject"
srcDirectory="app"
else
directory="airline"
fi
if [ $# -gt 1 ]; then
comment=$2
else
comment=""
fi
top=$(dirname "$0")
xmlFile=${top}/me.xml
projectDirectory=${top}/${directory}
pomFile=${projectDirectory}/pom.xml
if [ -f $pomFile ]; then
cd ${projectDirectory}
chmod +x ./mvnw
./mvnw -Pgrader ${mavenGoals}
cd -
fi
java -cp /u/whitlock/jars/grader.jar edu.pdx.cs410J.grader.${submitClass} -comment "${comment}" "${project}" "${xmlFile}" "${projectDirectory}/${srcDirectory}"