summaryrefslogtreecommitdiff
path: root/.circleci/tickle.sh
blob: 195c29c7906fba8b57ea0d29387c15deadaa410a (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
#!/bin/bash
set -o nounset -o errexit -o pipefail

function tickle() {
    while [ true ]; do
        echo "[$(date +%H:%M:%S)] Tickling..."
        sleep 60
    done
}

echo "Forking tickle process..."
tickle &
TICKLE_PID=$!

echo "Forking build process..."
eval $@ &
BUILD_PID=$!

echo "Waiting for build thread ($BUILD_PID)..."
wait $BUILD_PID

echo "Killing tickle thread ($TICKLE_PID)..."
kill $TICKLE_PID
echo "All done!"