5 # Keep cborRevision in sync with extlibs/tinycbor/SConscript's setting. Right now this script
6 # assumes cborRevision is a tag; comment out the second clause if cborRevision becomes
7 # a branch or a specific commit.
8 cborUrl="https://github.com/01org/tinycbor"
9 cborDir="./extlibs/tinycbor/tinycbor"
11 if [ ! -d ${cborDir} ]; then
13 echo "*********************************** Error: ****************************************"
14 echo "* Please download TinyCBOR using the following command: *"
15 echo "* $ git clone ${cborUrl} ${cborDir} -b ${cborRevision} "
16 echo "***********************************************************************************"
19 elif [ ! -z $(git tag -l $cborRevision) ]; then
21 echo "*********************************** Error: *******************************************"
22 echo "* TinyCBOR repo is out of date. Please update TinyCBOR using the following commands: *"
23 echo "* $ cd (authoritative TinyCBOR source repo location) *"
24 echo "* $ git fetch *"
25 echo "**************************************************************************************"
28 elif [ -d ${cborDir}/.git ]; then
30 git reset --hard ${cborRevision}
32 rm -rf ${cborDir}/.git*
34 echo "Assuming TinyCBOR is already on correct revision ${cborRevision}"