mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 22:49:01 -05:00
17 lines
305 B
Bash
17 lines
305 B
Bash
|
#!/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))
|
||
|
}
|
||
|
|
||
|
wait_file "target/exporter.js" 120 && {
|
||
|
node target/exporter.js
|
||
|
}
|