Commit 2303fd51 by Francisco Giordano Committed by GitHub

Merge pull request #329 from frangio/fix-test-script-cleanup

Fix test script cleanup and portability
parents 910fc491 bebe7046
#!/bin/bash
#!/usr/bin/env bash
# Executes cleanup function at script exit.
trap cleanup EXIT
cleanup() {
# Kill the testrpc instance that we started (if we started one).
if [ -n "$testrpc_pid" ]; then
# Kill the testrpc instance that we started (if we started one and if it's still running).
if [ -n "$testrpc_pid" ] && ps -p $testrpc_pid > /dev/null; then
kill -9 $testrpc_pid
fi
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment