mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00

* Fix SC2006: Use $(...) notation instead of legacy backticked `...`. * Fix SC2016: Expressions don't expand in single quotes, use double quotes for that. * Fix SC2046: Quote this to prevent word splitting. * Fix SC2053: Quote the right-hand side of == in [[ ]] to prevent glob matching. * Fix SC2068: Double quote array expansions to avoid re-splitting elements. * Fix SC2086: Double quote to prevent globbing and word splitting. * Fix SC2102: Ranges can only match single chars (mentioned due to duplicates). * Fix SC2140: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"? * Fix SC2145: Argument mixes string and array. Use * or separate argument. * Fix SC2209: warning: Use var=$(command) to assign output (or quote to assign string). Co-authored-by: Mehrdad <noreply@github.com>
29 lines
456 B
Bash
Executable file
29 lines
456 B
Bash
Executable file
#!/bin/bash
|
|
# Run a command, printing periodically to keep travis alive.
|
|
|
|
PID=$$
|
|
|
|
# Print output to avoid travis killing us
|
|
watchdog() {
|
|
for i in $(seq 2 2 150); do
|
|
sleep 120
|
|
echo "(running, ${i}m total)"
|
|
done
|
|
echo "TIMED OUT"
|
|
kill -SIGKILL $PID
|
|
}
|
|
|
|
watchdog & 2>/dev/null
|
|
WATCHDOG_PID=$!
|
|
|
|
time "$@"
|
|
|
|
CODE=$?
|
|
if [ $CODE != 0 ]; then
|
|
echo "FAILED $CODE"
|
|
kill $WATCHDOG_PID
|
|
exit $CODE
|
|
fi
|
|
|
|
kill $WATCHDOG_PID
|
|
exit 0
|