2023-09-09 16:09:18 -04:00
|
|
|
# ========================================================================
|
|
|
|
|
# Auth: alex
|
|
|
|
|
# File: setup.sh
|
2025-01-04 23:02:59 -05:00
|
|
|
# Revn: 01-04-2025 1.0
|
2023-09-09 16:09:18 -04:00
|
|
|
# Func: automate pi setup
|
|
|
|
|
#
|
2025-01-04 23:02:59 -05:00
|
|
|
# TODO
|
|
|
|
|
# [X] get link to newer version of go
|
|
|
|
|
# [X] make useful directories
|
|
|
|
|
# [ ] build TDM
|
|
|
|
|
# [ ] build ekho
|
|
|
|
|
# [ ] make symlinks to executables to ~/bin
|
|
|
|
|
# [ ] make symlinks to source in ~/src
|
|
|
|
|
# [X] make symlinks to .bashrc + friends
|
|
|
|
|
# [ ] connect to internet
|
|
|
|
|
# [ ] test?
|
2023-09-09 16:09:18 -04:00
|
|
|
# ========================================================================
|
|
|
|
|
# CHANGE LOG
|
|
|
|
|
# ------------------------------------------------------------------------
|
|
|
|
|
# 07-05-2023: added apt installs for vim, neofetch, tmux
|
|
|
|
|
# 07-06-2023: install stuffs for golang, rust, github
|
|
|
|
|
# 07-10-2023: added apt install for tshark
|
|
|
|
|
# 07-11-2023: mv calls for github/bash and github/TDM
|
|
|
|
|
# building TDM
|
|
|
|
|
# sudo echo calls for /etc/dhcpcd.conf for static ip
|
|
|
|
|
# empty and refill /etc/motd
|
|
|
|
|
# enabled ssh?
|
|
|
|
|
# fixed typo in golang download, had one, wanted L
|
2025-01-04 23:02:59 -05:00
|
|
|
# 10-07-2024: updated git clone commands
|
|
|
|
|
# symlink command for bashrc + friends
|
|
|
|
|
# added big todo list
|
|
|
|
|
# made bin/src directories
|
|
|
|
|
# 12-14-2024: updated golang version number
|
|
|
|
|
#*01-04-2025: added command to install nmap
|
|
|
|
|
# uncommented building TDM and mv'ing binary to ~/bin
|
|
|
|
|
# built ekho, moved to ~/bin/
|
|
|
|
|
# copied, built, and moved donut/boot to ~/src/ and ~/bin/
|
2023-09-09 16:09:18 -04:00
|
|
|
#
|
|
|
|
|
# ========================================================================
|
|
|
|
|
|
|
|
|
|
# update apt
|
|
|
|
|
sudo apt update && sudo apt upgrade
|
|
|
|
|
|
|
|
|
|
# install vim
|
|
|
|
|
sudo apt install -y vim
|
|
|
|
|
|
|
|
|
|
# install neofetch
|
|
|
|
|
sudo apt install -y neofetch
|
|
|
|
|
|
|
|
|
|
# install tmux
|
|
|
|
|
sudo apt install -y tmux
|
|
|
|
|
|
|
|
|
|
# install tshark
|
|
|
|
|
sudo apt install -y tshark
|
|
|
|
|
|
2024-04-12 00:17:38 -04:00
|
|
|
# install nmap
|
|
|
|
|
sudo apt install -y nmap
|
|
|
|
|
|
2025-01-04 23:02:59 -05:00
|
|
|
# TODO get newer version of Go
|
2023-09-09 16:09:18 -04:00
|
|
|
# install golang
|
2025-01-04 23:02:59 -05:00
|
|
|
wget https://dl.google.com/go/go1.21.1.linux-armv6l.tar.gz
|
|
|
|
|
sudo tar -C /usr/local -xzf go1.21.1.linux-armv6l.tar.gz
|
|
|
|
|
rm go1.21.1.linux-armv6l.tar.gz
|
2023-09-09 16:09:18 -04:00
|
|
|
echo "PATH=$PATH:/usr/local/go/bin" >> ~/.profile
|
|
|
|
|
echo "GOPATH=$HOME/go" >> ~/.profile
|
|
|
|
|
|
|
|
|
|
# install rust
|
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
|
|
|
|
2025-01-04 23:02:59 -05:00
|
|
|
# create the directory "Documents" if it doesn't exist
|
|
|
|
|
# if it does exist, who cares TODO test
|
|
|
|
|
cd ~
|
|
|
|
|
mkdir bin
|
|
|
|
|
mkdir src
|
|
|
|
|
mkdir Documents 2> /dev/null
|
|
|
|
|
cd Documents
|
|
|
|
|
|
2023-09-09 16:09:18 -04:00
|
|
|
# github treats
|
|
|
|
|
# lol good luck, without a PAT, this shit BREAKS
|
|
|
|
|
# start with my stuff
|
2025-01-04 23:02:59 -05:00
|
|
|
git clone https://github.com/alexander-the-alright/dotfiles
|
2023-09-09 16:09:18 -04:00
|
|
|
git clone https://github.com/alexander-the-alright/TDM
|
2025-01-04 23:02:59 -05:00
|
|
|
git clone https://github.com/alexander-the-alright/soary
|
|
|
|
|
git clone https://github.com/alexander-the-alright/ekho
|
|
|
|
|
|
|
|
|
|
# TODO make go
|
|
|
|
|
# build todo manager
|
|
|
|
|
go build TDM/tdm.go
|
|
|
|
|
mv tdm ~/bin/tdm
|
|
|
|
|
|
|
|
|
|
# make ekho
|
|
|
|
|
go build ekho/client
|
|
|
|
|
mv client ~/bin/client.o
|
|
|
|
|
|
|
|
|
|
# TODO symlinks
|
|
|
|
|
cd ~
|
|
|
|
|
ln -sf ~/Documents/dotfiles/pi/.vim ~/.vim
|
|
|
|
|
ln -sf ~/Documents/dotfiles/.vimrc ~/.vimrc
|
|
|
|
|
ln -sf ~/Documents/dotfiles/pi/.bash_profile ~/.bashrc
|
|
|
|
|
|
|
|
|
|
# copy and build binaries
|
|
|
|
|
cp ~/Documents/dotfiles/pi/donut.c ~/src
|
|
|
|
|
cp ~/Documents/dotfiles/pi/boot.go ~/src
|
|
|
|
|
gcc -o donut.o src/donut.c
|
|
|
|
|
gcc -o boot src/boot.go
|
|
|
|
|
mv boot ~/bin/
|
|
|
|
|
mv donut.o ~/bin/
|
|
|
|
|
|
2023-09-09 16:09:18 -04:00
|
|
|
# elsewhere
|
|
|
|
|
git clone https://github.com/stianeikeland/go-rpio
|
|
|
|
|
git clone https://github.com/golemparts/rppal
|
|
|
|
|
|
|
|
|
|
|
2025-01-04 23:02:59 -05:00
|
|
|
# TODO internet
|
2023-09-09 16:09:18 -04:00
|
|
|
|
2025-01-04 23:02:59 -05:00
|
|
|
# XXX this dumb router breaks this
|
2023-09-09 16:09:18 -04:00
|
|
|
# create static local ip address
|
2025-01-04 23:02:59 -05:00
|
|
|
#sudo echo "" >> /etc/dhcpcd.conf
|
|
|
|
|
#sudo echo "" >> /etc/dhcpcd.conf
|
|
|
|
|
#sudo echo "interface wlan0" >> /etc/dhcpcd.conf
|
|
|
|
|
#sudo echo "static ip_address=192.168.1.160/24" >> /etc/dhcpcd.conf
|
|
|
|
|
#sudo echo "static routers=192.168.1.1" >> /etc/dhcpcd.conf
|
|
|
|
|
#sudo echo "static domain_name_servers=192.168.1.1" >> /etc/dhcpcd.conf
|
2023-09-09 16:09:18 -04:00
|
|
|
|
|
|
|
|
# enable ssh?
|
|
|
|
|
sudo touch /boot/ssh
|
|
|
|
|
|