Skip to content

Commit

Permalink
add set.env
Browse files Browse the repository at this point in the history
  • Loading branch information
caigao committed May 16, 2013
1 parent ebaeab2 commit f9425d8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions set.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
BUILDROOT=`pwd`

if [ ! -d "${BUILDROOT}/tools" ] ; then
echo "need to creat tools folder......"
mkdir tools
else

echo "already exist tools folder......"
fi
cd tools

if [ ! -d "${BUILDROOT}/tools/arm" ] ; then
if [ ! -f "${BUILDROOT}/tools/gcc-arm-none-eabi-latest-linux32.tar.gz" ] ; then
echo "need download toolchain......"
wget http://static.leaflabs.com/pub/codesourcery/gcc-arm-none-eabi-latest-linux32.tar.gz
fi

echo "need un-tar toolchain......"
tar xzvf gcc-arm-none-eabi-latest-linux32.tar.gz
else

echo "already exist toolchain......"
fi

cd -
export PATH=${BUILDROOT}/tools/arm/bin:$PATH

0 comments on commit f9425d8

Please sign in to comment.