-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·27 lines (21 loc) · 760 Bytes
/
setup.sh
File metadata and controls
executable file
·27 lines (21 loc) · 760 Bytes
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
#!/bin/bash
# Run this ONCE before anything else.
# Downloads the JUnit 5 standalone JAR into tests/lib/
JAR_URL="https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.10.2/junit-platform-console-standalone-1.10.2.jar"
JAR_PATH="tests/lib/junit-standalone.jar"
mkdir -p tests/lib
if [ -f "$JAR_PATH" ]; then
echo "JUnit JAR already present. Nothing to do."
exit 0
fi
echo "Downloading JUnit 5 standalone JAR..."
if command -v curl &>/dev/null; then
curl -L "$JAR_URL" -o "$JAR_PATH"
elif command -v wget &>/dev/null; then
wget "$JAR_URL" -O "$JAR_PATH"
else
echo "ERROR: Neither curl nor wget found. Install one and retry."
exit 1
fi
echo ""
echo "Done. Run ./run_tests.sh to test your solutions."