#!/bin/sh

TOOLS_FILE=avr-tools-07082005.tar.bz2
# script creates direcotry avr/ with all tools
# default install is: /usr/local/avr
INSTALL_DIR=/usr/local
# also tools can be installes in current directory
#INSTALL_DIR=`pwd`

printf "\n\nDecompressing files into $INSTALL_DIR...\n\n"
mkdir $INSTALL_DIR
tar xvjf $TOOLS_FILE -C $INSTALL_DIR

printf "\n\nAdding new libraries to system database...\n\n"
printf "\n"$INSTALL_DIR"/avr/lib\n" >> /etc/ld.so.conf
ldconfig

printf "\n\nUpdating PATH and ~/.bashrc file...\n\n"
printf "\nexport PATH=$PATH:$INSTALL_DIR/bin\n" >> ~/.bashrc
