-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrunAssignment
More file actions
executable file
·40 lines (37 loc) · 1.04 KB
/
runAssignment
File metadata and controls
executable file
·40 lines (37 loc) · 1.04 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
#!/bin/bash
set -e
if [ "$#" -lt 1 ]; then
echo "Usage: ./runAssignment (assignmentNumber) (studentName) (--verbose)"
exit 1
fi
TERM="cs261-s26"
RUN_NUMBER="$1"
STUDENT_NAME="$2"
VERBOSE_FLAG="$3"
# verbosity check
if [ "$VERBOSE_FLAG" == "--verbose" ] || [ "$STUDENT_NAME" == "--verbose" ]; then
BE_VERBOSE="--verbose"
else
BE_VERBOSE=""
fi
case $RUN_NUMBER in
2 | 3 | 3old | 4 | 4old)
FILENAME="examples/CS261_Assignment${RUN_NUMBER}_Postman.json"
;;
6 | 6old)
if [ -z "$STUDENT_NAME" ] || [ "$STUDENT_NAME" == "--verbose" ]; then
echo "Error: studentName is required for assignment 6"
exit 1
fi
FILENAME="examples/CS261_Assignment${RUN_NUMBER}_Postman.json"
;;
*)
echo "Unknown Argument or no Assignment For $RUN_NUMBER"
exit 1
;;
esac
if [[ "$RUN_NUMBER" == "6" || "$RUN_NUMBER" == "6old" ]]; then
node putter run "$FILENAME" --address "$STUDENT_NAME.$TERM.meancat.com" --https $BE_VERBOSE
else
node putter run "$FILENAME" $BE_VERBOSE
fi