summaryrefslogtreecommitdiff
path: root/cli-tests/sort-img/run.sh
blob: 5cd5d3eabd36f311bf99e30d70f0e66ca250c6b9 (plain)
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
#!/bin/bash
set -e

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
LOG_FILE="$SCRIPT_DIR/${TIMESTAMP}_run.log"

exec > "$LOG_FILE" 2>&1

echo "=== Running teardown ==="
"$SCRIPT_DIR/teardown.sh"

echo ""
echo "=== Running setup ==="
"$SCRIPT_DIR/setup.sh"

echo ""
echo "=== Running task ==="
TASK=$(cat "$SCRIPT_DIR/task.txt")
cd /home/grail/projects/plays/goplays/gf-lt
go run . -cli -msg "$TASK"

echo ""
echo "=== Done ==="
echo "Log file: $LOG_FILE"