12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #!/bin/bash
- # http://www.nongnu.org/avr-libc/user-manual/install_tools.html
- # Stop on errors
- set -e
- source avr-file-names
- TIME_START=$(date +%s)
- makeDir()
- {
- rm -rf "$1/"
- mkdir -p "$1"
- }
- echo "Downloading sources..."
- if [ ! -f $NAME_AVRDUDE.tar.gz ]; then
- wget https://ftp.mirrorservice.org/sites/download.savannah.gnu.org/releases/avrdude/$NAME_AVRDUDE.tar.gz
- fi
- # Make avrdude
- NAME_AVRDUDE_BLD=${NAME_AVRDUDE}_bld
- echo "Making AVRDUDE in $NAME_AVRDUDE_BLD..."
- echo "Extracting..."
- rm -rf $NAME_AVRDUDE/
- tar xzf $NAME_AVRDUDE.tar.gz
- makeDir $NAME_AVRDUDE_BLD
- cd $NAME_AVRDUDE_BLD
- ../$NAME_AVRDUDE/configure --prefix=$PREFIX
- make -j $JOBCOUNT
- sudo make install-strip
- cd ..
- TIME_END=$(date +%s)
- TIME_RUN=$(($TIME_END - $TIME_START))
- echo ""
- echo "Done in $TIME_RUN seconds"
- exit 0
|