-
Notifications
You must be signed in to change notification settings - Fork 578
/
run-spread
executable file
·32 lines (26 loc) · 774 Bytes
/
run-spread
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -xeu
need_rebuild=1
shopt -s nullglob
if [ "${NO_REBUILD:-0}" = "1" ]; then
echo "-- $(date) -- requested no snap rebuild"
need_rebuild=0
# check if we have any snaps built at all
built_snaps=(built-snap/snapd_*.snap.keep)
if (( "${#built_snaps[@]}" > 0 )); then
echo "-- $(date) -- found prebuilt snapd snaps:"
for s in "${built_snaps[@]}"; do
echo "-- $s"
done
else
echo "-- $(date) -- no prebuilt snaps found"
need_rebuild=1
fi
fi
if [ "$need_rebuild" = 1 ]; then
echo "-- $(date) -- rebuilding snapd snap"
./tests/build-test-snapd-snap
echo "-- $(date) -- snapd snap rebuild complete"
fi
# Run spread
SPREAD_USE_PREBUILT_SNAPD_SNAP=true exec spread "$@"