Updated scripts

This commit is contained in:
Christoffer Martinsson 2024-09-23 16:24:03 +02:00
parent 830861daf9
commit 9360c2577f
2 changed files with 45 additions and 14 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
if [ -f /home/$USER/.desktop_gnome ]; then if [ -f /home/$USER/.desktop_ubuntu_2204 ]; then
while [ ! -f /media/$USER/RPI-RP2/INFO_UF2.TXT ]; do while [ ! -f /media/$USER/RPI-RP2/INFO_UF2.TXT ]; do
sleep 1 sleep 1
done done

View File

@ -7,9 +7,12 @@ sudo apt -y purge --auto-remove neovim
# Install system packages # Install system packages
printf -- '\033[33m Installing system packages\n\033[37m' printf -- '\033[33m Installing system packages\n\033[37m'
sudo apt update && sudo apt -y upgrade sudo apt update
sudo apt -y install ninja-build gettext cmake unzip curl python3 python3-pip python3-venv \ sudo apt install -y nala
build-essential libssl-dev libffi-dev python3-dev file tmux libudev-dev pkg-config locales nala sudo nala update
sudo nala upgrade -y
sudo nala install -y gpg ninja-build gettext cmake unzip curl python3 python3-pip python3-venv \
build-essential libssl-dev libffi-dev python3-dev file tmux libudev-dev pkg-config locales
# Setup locals # Setup locals
printf -- '\033[33m Setup locals\n\033[37m' printf -- '\033[33m Setup locals\n\033[37m'
@ -84,7 +87,7 @@ cargo install ripgrep
# Install fd # Install fd
printf -- '\033[33m Installing fd\n\033[37m' printf -- '\033[33m Installing fd\n\033[37m'
sudo apt install -y fd-find sudo nala install -y fd-find
# Install lazygit # Install lazygit
printf -- '\033[33m Installing lazygit\n\033[37m' printf -- '\033[33m Installing lazygit\n\033[37m'
@ -98,12 +101,12 @@ rm ~/lazygit && rm ~/lazygit.tar.gz
# Install gdu # Install gdu
printf -- '\033[33m Installing gdu\n\033[37m' printf -- '\033[33m Installing gdu\n\033[37m'
sudo add-apt-repository -y ppa:daniel-milde/gdu sudo add-apt-repository -y ppa:daniel-milde/gdu
sudo apt update sudo nala update
sudo apt install -y gdu sudo nala install -y gdu
# Install ruby # Install ruby
printf -- '\033[33m Installing ruby\n\033[37m' printf -- '\033[33m Installing ruby\n\033[37m'
sudo apt install -y ruby ruby-dev sudo nala install -y ruby ruby-dev
sudo gem install neovim sudo gem install neovim
# Install bottom # Install bottom
@ -115,23 +118,23 @@ rm ~/bottom_0.9.1_amd64.deb
# Install go # Install go
printf -- '\033[33m Installing go\n\033[37m' printf -- '\033[33m Installing go\n\033[37m'
sudo apt install -y golang sudo nala install -y golang
# Install php # Install php
printf -- '\033[33m Installing php\n\033[37m' printf -- '\033[33m Installing php\n\033[37m'
sudo apt install -y php php-curl php-xml php-mbstring sudo nala install -y php php-curl php-xml php-mbstring
# Install luarocks # Install luarocks
printf -- '\033[33m Installing luarocks\n\033[37m' printf -- '\033[33m Installing luarocks\n\033[37m'
sudo apt install -y luarocks sudo nala install -y luarocks
# Install composer # Install composer
printf -- '\033[33m Installing composer\n\033[37m' printf -- '\033[33m Installing composer\n\033[37m'
sudo apt install -y composer sudo nala install -y composer
# Install java # Install java
printf -- '\033[33m Installing java\n\033[37m' printf -- '\033[33m Installing java\n\033[37m'
sudo apt install -y default-jdk sudo nala install -y default-jdk
# Install julia # Install julia
printf -- '\033[33m Installing julia\n\033[37m' printf -- '\033[33m Installing julia\n\033[37m'
@ -146,7 +149,7 @@ rm -rf julia-1.9.0
printf -- '\033[33m Installing node\n\033[37m' printf -- '\033[33m Installing node\n\033[37m'
cd ~ cd ~
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs sudo nala install -y nodejs
# Install platformio # Install platformio
printf -- '\033[33m Installing platformio\n\033[37m' printf -- '\033[33m Installing platformio\n\033[37m'
@ -160,6 +163,34 @@ pip3 install pynvim
printf -- '\033[33m Installing neovim for node\n\033[37m' printf -- '\033[33m Installing neovim for node\n\033[37m'
sudo npm install -g neovim sudo npm install -g neovim
# Install Ubuntu 22.04 intune
printf -- '\033[33m Installing Ubuntu 22.04 intune\n\033[37m'
if [ -f /home/$USER/.desktop_ubuntu_2204_intune ]; then
sudo nala install -y software-properties-common apt-transport-https curl ca-certificates
curl -fSsL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/microsoft-edge.gpg > /dev/null
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-edge.gpg] https://packages.microsoft.com/repos/edge stable main' | sudo tee /etc/apt/sources.list.d/microsoft-edge.list
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/ubuntu/22.04/prod jammy main" > /etc/apt/sources.list.d/microsoft-ubuntu-jammy-prod.list'
sudo rm microsoft.gpg
sudo nala update
sudo nala install -y microsoft-edge-stable intune-portal
fi
# Install Ubuntu 22.04 apps
printf -- '\033[33m Installing Ubuntu 22.04 desktop apps\n\033[37m'
if [ -f /home/$USER/.desktop_ubuntu_2204 ]; then
sudo add-apt-repository -y ppa:flatpak/stable
sudo nala update
sudo nala install -y flatpak kitty gnome-shell-extension-manager
sudo snap install --classic code
flatpak install -y flathub com.discordapp.Discord
flatpak install -y flathub org.kicad.KiCad
flatpak install -y flathub org.freecadweb.FreeCAD
flatpak install -y flathub com.moonlight_stream.Moonlight
flatpak install -y flathub com.jgraph.drawio.desktop
fi
# Symlink nvim config # Symlink nvim config
printf -- '\033[33m Symlinking nvim config\n\033[37m' printf -- '\033[33m Symlinking nvim config\n\033[37m'
mkdir -p ~/.config/nvim mkdir -p ~/.config/nvim