Catch errors that can happend when cloning repos.
This commit is contained in:
		
							
								
								
									
										14
									
								
								dev/build.sh
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								dev/build.sh
									
									
									
									
									
								
							@@ -6,7 +6,7 @@ mkdir -p $INSTALL_DIR/dev
 | 
				
			|||||||
cd $INSTALL_DIR/dev
 | 
					cd $INSTALL_DIR/dev
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ! -d wiringPi ]; then
 | 
					if [ ! -d wiringPi ]; then
 | 
				
			||||||
    git clone git://git.drogon.net/wiringPi
 | 
					    git clone git://git.drogon.net/wiringPi  || { echo 'Cloning wiringPi failed.' ; exit 1; }
 | 
				
			||||||
    cd wiringPi
 | 
					    cd wiringPi
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    cd wiringPi
 | 
					    cd wiringPi
 | 
				
			||||||
@@ -17,7 +17,7 @@ fi
 | 
				
			|||||||
cd ..
 | 
					cd ..
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ! -d lora_gateway ]; then
 | 
					if [ ! -d lora_gateway ]; then
 | 
				
			||||||
    git clone https://github.com/kersing/lora_gateway.git
 | 
					    git clone https://github.com/kersing/lora_gateway.git  || { echo 'Cloning lora_gateway failed.' ; exit 1; }
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    cd lora_gateway
 | 
					    cd lora_gateway
 | 
				
			||||||
    git reset --hard
 | 
					    git reset --hard
 | 
				
			||||||
@@ -26,7 +26,7 @@ else
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ! -d paho.mqtt.embedded-c ]; then
 | 
					if [ ! -d paho.mqtt.embedded-c ]; then
 | 
				
			||||||
    git clone https://github.com/kersing/paho.mqtt.embedded-c.git
 | 
					    git clone https://github.com/kersing/paho.mqtt.embedded-c.git  || { echo 'Cloning paho mqtt failed.' ; exit 1; }
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    cd paho.mqtt.embedded-c
 | 
					    cd paho.mqtt.embedded-c
 | 
				
			||||||
    git reset --hard
 | 
					    git reset --hard
 | 
				
			||||||
@@ -35,7 +35,7 @@ else
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ! -d ttn-gateway-connector ]; then
 | 
					if [ ! -d ttn-gateway-connector ]; then
 | 
				
			||||||
    git clone https://github.com/kersing/ttn-gateway-connector.git
 | 
					    git clone https://github.com/kersing/ttn-gateway-connector.git  || { echo 'Cloning gateway connector failed.' ; exit 1; }
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    cd ttn-gateway-connector
 | 
					    cd ttn-gateway-connector
 | 
				
			||||||
    git reset --hard
 | 
					    git reset --hard
 | 
				
			||||||
@@ -44,7 +44,7 @@ else
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ! -d protobuf-c ]; then
 | 
					if [ ! -d protobuf-c ]; then
 | 
				
			||||||
    git clone https://github.com/kersing/protobuf-c.git
 | 
					    git clone https://github.com/kersing/protobuf-c.git  || { echo 'Cloning protobuf-c failed.' ; exit 1; }
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    cd protobuf-c
 | 
					    cd protobuf-c
 | 
				
			||||||
    git reset --hard
 | 
					    git reset --hard
 | 
				
			||||||
@@ -53,7 +53,7 @@ else
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ! -d packet_forwarder ]; then
 | 
					if [ ! -d packet_forwarder ]; then
 | 
				
			||||||
    git clone https://github.com/kersing/packet_forwarder.git
 | 
					    git clone https://github.com/kersing/packet_forwarder.git  || { echo 'Cloning packet forwarder failed.' ; exit 1; }
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    cd packet_forwarder
 | 
					    cd packet_forwarder
 | 
				
			||||||
    git reset --hard
 | 
					    git reset --hard
 | 
				
			||||||
@@ -62,7 +62,7 @@ else
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ! -d protobuf ]; then
 | 
					if [ ! -d protobuf ]; then
 | 
				
			||||||
    git clone https://github.com/google/protobuf.git
 | 
					    git clone https://github.com/google/protobuf.git  || { echo 'Cloning protobuf failed.' ; exit 1; }
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
    cd protobuf
 | 
					    cd protobuf
 | 
				
			||||||
    git reset --hard
 | 
					    git reset --hard
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user