summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2015-12-09 14:41:09 -0600
committerMike Fiore <mfiore@multitech.com>2015-12-09 14:41:09 -0600
commit4a3b068776193d3487548bd6facadb2c06c0de2d (patch)
tree646c114830d31b05e46f0717fd6ae25dc0c745d0
parent5a74150c78737daf2764570835b59b45141f3775 (diff)
downloadmtdot-box-evb-factory-firmware-4a3b068776193d3487548bd6facadb2c06c0de2d.tar.gz
mtdot-box-evb-factory-firmware-4a3b068776193d3487548bd6facadb2c06c0de2d.tar.bz2
mtdot-box-evb-factory-firmware-4a3b068776193d3487548bd6facadb2c06c0de2d.zip
update setup script - clone mbed libs if they don't exist, otherwise update them
-rwxr-xr-xsetup.sh23
1 files changed, 17 insertions, 6 deletions
diff --git a/setup.sh b/setup.sh
index 6bc3110..1c34019 100755
--- a/setup.sh
+++ b/setup.sh
@@ -1,15 +1,26 @@
#!/bin/bash
+DIR=$(pwd)
+LIB="libs/"
+LIBS=("ISL29011" "MMA845x" "MPL3115A2" "NCP5623B" "GpsParser" "DOGS102")
+
echo "creating libs directory..."
mkdir -p libs/
-hg clone https://developer.mbed.org/teams/Multi-Hackers/code/ISL29011/ libs/ISL29011
-hg clone https://developer.mbed.org/teams/Multi-Hackers/code/MMA845x/ libs/MMA845x
-hg clone https://developer.mbed.org/teams/Multi-Hackers/code/MPL3115A2/ libs/MPL3115A2
-hg clone https://developer.mbed.org/teams/Multi-Hackers/code/NCP5623B/ libs/NCP5623B
-hg clone https://developer.mbed.org/teams/Multi-Hackers/code/GpsParser/ libs/GpsParser
-hg clone https://developer.mbed.org/teams/Multi-Hackers/code/DOGS102/ libs/DOGS102
+
+for i in ${LIBS[@]}; do
+ cd $DIR
+ if [ ! -d "$LIB/${i}" ]; then
+ echo "cloning ${i}"
+ hg clone https://developer.mbed.org/teams/Multi-Hackers/code/${i} $LIB/${i}
+ else
+ cd $LIB/${i}
+ echo "updating ${i}"
+ hg pull
+ fi
+done
echo "generating version header..."
+cd $DIR
./version.sh
echo "done"