From 2a986717941692e452a3306c348567b8b5231507 Mon Sep 17 00:00:00 2001 From: Ray Ozzie Date: Sat, 26 Mar 2016 15:29:19 -0400 Subject: [PATCH] build fixes --- build.sh | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 75bdf28..2ed16e2 100755 --- a/build.sh +++ b/build.sh @@ -19,14 +19,26 @@ if [ ! -d "$BUILD_DIR" ]; then mkdir $BUILD_DIR; fi pushd $BUILD_DIR # Build WiringPi so that we can do Raspberry Pi I/O -git clone git://git.drogon.net/wiringPi -pushd wiringPi +if [ ! -d wiringPi ]; then + git clone git://git.drogon.net/wiringPi + pushd wiringPi +else + pushd wiringPi + git reset --hard + git pull +fi ./build popd # Build LoRa gateway app for this specific platform -git clone https://github.com/TheThingsNetwork/lora_gateway.git -pushd lora_gateway +if [ ! -d lora_gateway ]; then + git clone https://github.com/TheThingsNetwork/lora_gateway.git + pushd lora_gateway +else + pushd lora_gateway + git reset --hard + git pull +fi sed -i -e 's/PLATFORM= kerlink/PLATFORM= imst_rpi/g' ./libloragw/library.cfg # Comment the following in or out as needed for hardware debugging #sed -i -e 's/DEBUG_SPI= 0/DEBUG_SPI= 1/g' ./libloragw/library.cfg @@ -38,8 +50,14 @@ make popd # Build the packet forwarder -git clone https://github.com/TheThingsNetwork/packet_forwarder.git -pushd packet_forwarder +if [ ! -d packet_forwarder ]; then + git clone https://github.com/TheThingsNetwork/packet_forwarder.git + pushd packet_forwarder +else + pushd packet_forwarder + git pull + git reset --hard +fi make popd