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_GDB.tar.xz ]; then
- wget https://ftp.mirrorservice.org/sites/sourceware.org/pub/gdb/releases/$NAME_GDB.tar.xz
- fi
- # Make AVR-libc
- NAME_GDB_BLD=${NAME_GDB}_bld
- echo "Making AVR-GDB in $NAME_GDB_BLD..."
- echo "Extracting..."
- rm -rf $NAME_GDB/
- tar xf $NAME_GDB.tar.xz
- makeDir $NAME_GDB_BLD
- cd $NAME_GDB_BLD
- ../$NAME_GDB/configure --prefix=$PREFIX --target=avr
- make -j $JOBCOUNT
- sudo make install
- cd ..
- TIME_END=$(date +%s)
- TIME_RUN=$(($TIME_END - $TIME_START))
- echo ""
- echo "Done in $TIME_RUN seconds"
- exit 0
|