| 705d11b0 Andy McCall ↶ |
1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
set -eu |
| 9 |
warm=/opt/warm/oxygenhub |
| 1d970288 Andy McCall ↶ |
10 |
|
| 11 |
if [ -d "$warm" ] && [ -z "$(ls -A target 2>/dev/null | grep -vx 'lost+found')" ]; then |
| 705d11b0 Andy McCall ↶ |
12 |
start=$(date +%s) |
| 13 |
if cp -R --preserve=timestamps "$warm/." target/; then |
| 14 |
echo "flow: prebuilt dependencies copied in $(( $(date +%s) - start )) s" |
| 15 |
else |
| 16 |
echo "flow: could not copy the prebuilt dependencies; building them" >&2 |
| 17 |
rm -rf target/* 2>/dev/null || true |
| 18 |
fi |
| 19 |
fi |
| 20 |
exec "$@" |