File size: 507 Bytes
8897300
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
set -u
# Upstream solutions expect to run from the challenge files in /root.
cp /solution/* /root/ 2>/dev/null || true
cd /root
chmod +x /solution/*.sh 2>/dev/null || true
if [ -f /solution/requirements.sh ]; then /solution/requirements.sh; fi
/solution/solution.sh > /tmp/solution_output.txt 2>&1 || true
grep -aoE '[A-Za-z0-9_]{1,32}\{[^}]{4,256}\}' /tmp/solution_output.txt | head -1 > /app/response.txt
rm -f /root/solution.sh /root/requirements.sh /root/solve.py 2>/dev/null || true
exit 0