8
8
# Usage: ./batch.sh <DHCP QEMU image IP>
9
9
#
10
10
11
+ set -e
11
12
source buildlib.sh # initializes $IMGNAME
12
13
13
14
IP=$1 # First argument is the QEMU Raspbian IP address
@@ -29,15 +30,15 @@ export NO_CONFIG=1 # skip interactive configuration
29
30
30
31
# # BUILD
31
32
32
- download_resize_raspbian_img 1G " $IMGBASE " || exit 1
33
+ download_resize_raspbian_img 1G " $IMGBASE "
33
34
34
- NO_HALT_STEP=1 ./installer.sh prepare.sh " $IP " " $IMGBASE " || exit 1
35
- ./installer.sh lamp.sh " $IP " " $( ls -1t * .img | head -1 ) " || exit 1
36
- ./installer.sh $NC_INSTALL " $IP " " $( ls -1t * .img | head -1 ) " || exit 1
37
- ./installer.sh nextcloudpi.sh " $IP " " $( ls -1t * .img | head -1 ) " || exit 1
38
- ./installer.sh $NC_CONFIG " $IP " " $( ls -1t * .img | head -1 ) " || exit 1
39
- ./installer.sh raspbian-cleanup.sh " $IP " " $( ls -1t * .img | head -1 ) " || exit 1
40
- # ./installer.sh build-devel.sh "$IP" "$( ls -1t *.img | head -1 )" || exit 1
35
+ NO_HALT_STEP=1 ./installer.sh prepare.sh " $IP " " $IMGBASE "
36
+ ./installer.sh lamp.sh " $IP " " $( ls -1t * .img | head -1 ) "
37
+ ./installer.sh $NC_INSTALL " $IP " " $( ls -1t * .img | head -1 ) "
38
+ ./installer.sh nextcloudpi.sh " $IP " " $( ls -1t * .img | head -1 ) "
39
+ ./installer.sh $NC_CONFIG " $IP " " $( ls -1t * .img | head -1 ) "
40
+ ./installer.sh raspbian-cleanup.sh " $IP " " $( ls -1t * .img | head -1 ) "
41
+ # ./installer.sh build-devel.sh "$IP" "$( ls -1t *.img | head -1 )"
41
42
42
43
# # PACKING
43
44
@@ -54,14 +55,14 @@ launch_qemu "$IMGNAME.img" &
54
55
sleep 10
55
56
wait_SSH " $IP "
56
57
sleep 180 # Wait for the services to start. Improve this ( wait HTTP && trusted domains )
57
- tests/tests.py " $IP " || exit 1
58
+ tests/tests.py " $IP "
58
59
59
60
ssh_pi " $IP " sudo halt
60
61
61
62
# # UPLOADING
62
63
63
64
create_torrent " ${IMGNAME} .tar.bz2"
64
- upload_ftp " $IMGNAME " || true
65
+ upload_ftp " $IMGNAME "
65
66
66
67
# # CLEANUP
67
68
0 commit comments