0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00
penpot/exporter/scripts/wait-and-start.sh

17 lines
295 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -e
wait_file() {
local file="$1"; shift
local wait_seconds="${1:-10}"; shift # 10 seconds as default timeout
until test $((wait_seconds--)) -eq 0 -o -f "$file" ; do sleep 1; done
((++wait_seconds))
}
2020-09-10 09:27:14 +02:00
wait_file "target/app.js" 120 && {
node target/app.js
}