summaryrefslogtreecommitdiff
path: root/setup.sh
blob: 1c3401952881226600d541212fe652921fb0f39c (plain)
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
#!/bin/bash

DIR=$(pwd)
LIB="libs/"
LIBS=("ISL29011" "MMA845x" "MPL3115A2" "NCP5623B" "GpsParser" "DOGS102")

echo "creating libs directory..."
mkdir -p libs/

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"