This repository has been archived by the owner on Apr 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
install_flasher
40 lines (31 loc) · 1.92 KB
/
install_flasher
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
#instructions:
#after downloading this file go to terminal and run
#sudo chmod u+x /home/$USER/Downloads/install_flasher
#source /home/$USER/Downloads/install_flasher
#
#this should run the instalation from begining to end. if an error occures it should drop out and tell you what happened
#this has only been tested on ubuntu 20.04 but should work for any newer version of ubuntu.
#be sure to run this with the command source or it will not work do not use ./
#this program will create a file on your desktop caller Meshtastic-Flasher. you should be able to just double click on this file and the flasher should open
#if you prefer to launch the flasher from terminal its now a system program as well so just type meshtastic-flasher in the termainal and it will launch
#
#Note: i have yet to figure out how to set the logo the the launcher on the desktop. if anyone reads this and actualy knows how feel free to submit it un a pull request
sudo apt update -y
sudo apt upgrade -y # run updates
sudo apt install -y python3 python3-pip python3-venv # install requirments
mkdir /home/$USER/meshtastic_flasher # make a directory for flasher
cd /home/$USER/meshtastic_flasher # move over to the directory
python3 -m venv venv # setup python virtual environment
source venv/bin/activate # activate python virtual environment
pip install --upgrade pip # update
pip install meshtastic-flasher # Install Flasher
cat > meshtastic-flasher.sh <<EOF #make launcher bash
#!/bin/bash
cd /home/$USER/meshtastic_flasher # move over to the directory
source venv/bin/activate # activate python virtual environment
meshtastic-flasher
EOF
sudo chmod u+x /home/$USER/meshtastic_flasher/meshtastic-flasher.sh #make launcher bash executable
sudo ln -s /home/$USER/meshtastic_flasher/meshtastic-flasher.sh /bin/meshtastic-flasher #put launcher in system programs
sudo ln -s /bin/meshtastic-flasher /home/$USER/Desktop/Meshtastic-Flasher #put luancher on desktop