Skip to content

Commit e95fa11

Browse files
authored
Merge pull request #1 from DexterInd/master
sync with DexterInd
2 parents 51db635 + c9cfd19 commit e95fa11

2 files changed

Lines changed: 71 additions & 1 deletion

File tree

install_avrdude.sh

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/usr/bin/env bash
2+
3+
# Create AVRDUDE folder. Create it if it does not exist
4+
create_avrdude_folder(){
5+
AVRDUDE_DIR='/home/pi/Dexter/lib/AVRDUDE'
6+
if [ -d "$AVRDUDE_DIR" ]; then
7+
echo $AVRDUDE_DIR" Found!"
8+
else
9+
DIRECTORY='/home/pi/Dexter'
10+
if [ -d "$DIRECTORY" ]; then
11+
# Will enter here if $DIRECTORY exists, even if it contains spaces
12+
echo $DIRECTORY" Directory Found !"
13+
else
14+
echo "creating "$DIRECTORY
15+
mkdir $DIRECTORY
16+
fi
17+
18+
DIRECTORY='/home/pi/Dexter/lib'
19+
if [ -d "$DIRECTORY" ]; then
20+
# Will enter here if $DIRECTORY exists, even if it contains spaces
21+
echo $DIRECTORY" Directory Found!"
22+
else
23+
echo "creating "$DIRECTORY
24+
mkdir $DIRECTORY
25+
fi
26+
27+
pushd $DIRECTORY
28+
git clone https://github.com/DexterInd/AVRDUDE.git
29+
popd
30+
fi
31+
}
32+
# Install Avrdude 5.1 from Dexter repos
33+
install_avrdude(){
34+
#Updating AVRDUDE
35+
FILENAME=tmpfile.txt
36+
AVRDUDE_VER=5.10
37+
avrdude -v &> $FILENAME
38+
39+
#Only install avrdude 5.1 if it does not exist
40+
if grep -q $AVRDUDE_VER $FILENAME
41+
then
42+
echo "avrdude" $AVRDUDE_VER "Found"
43+
else
44+
echo "avrdude" $AVRDUDE_VER "Not Found,Installing avrdude now"
45+
create_avrdude_folder
46+
47+
##########################################
48+
#Installing AVRDUDE
49+
##########################################
50+
pushd /home/pi/Dexter/lib/AVRDUDE/avrdude
51+
52+
# Install the avrdude deb package
53+
# No need to wget since files should be there in the avrdude folder
54+
# wget https://github.com/DexterInd/AVRDUDE/raw/master/avrdude/avrdude_5.10-4_armhf.deb
55+
sudo dpkg -i avrdude_5.10-4_armhf.deb
56+
sudo chmod 4755 /usr/bin/avrdude
57+
58+
# Setup config files
59+
# wget http://project-downloads.drogon.net/gertboard/setup.sh
60+
chmod +x setup.sh
61+
sudo ./setup.sh
62+
63+
# pushd /etc/minicom
64+
# sudo wget http://project-downloads.drogon.net/gertboard/minirc.ama0
65+
# sudo sed -i '/Exec=arduino/c\Exec=sudo arduino' /usr/share/applications/arduino.desktop
66+
echo " "
67+
popd
68+
fi
69+
rm $FILENAME
70+
}

update_wiringpi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
source /home/pi/di_update/Raspbian_For_Robots/upd_script/functions_library.sh
2+
source /home/pi/Dexter/lib/Dexter/script_tools/functions_library.sh
33

44
PIHOME=/home/pi
55
DEXTER=Dexter

0 commit comments

Comments
 (0)