From 9360c2577f1090c94311cee473a5aa6edc564f12 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Mon, 23 Sep 2024 16:24:03 +0200 Subject: [PATCH] Updated scripts --- pico-load.sh | 2 +- update.sh | 57 ++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 45 insertions(+), 14 deletions(-) diff --git a/pico-load.sh b/pico-load.sh index fb919c3..177d035 100755 --- a/pico-load.sh +++ b/pico-load.sh @@ -1,5 +1,5 @@ #!/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 sleep 1 done diff --git a/update.sh b/update.sh index b80ae6f..10f34b8 100755 --- a/update.sh +++ b/update.sh @@ -7,9 +7,12 @@ sudo apt -y purge --auto-remove neovim # Install system packages printf -- '\033[33m Installing system packages\n\033[37m' -sudo apt update && sudo apt -y upgrade -sudo apt -y install 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 nala +sudo apt update +sudo apt install -y 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 printf -- '\033[33m Setup locals\n\033[37m' @@ -84,7 +87,7 @@ cargo install ripgrep # Install fd printf -- '\033[33m Installing fd\n\033[37m' -sudo apt install -y fd-find +sudo nala install -y fd-find # Install lazygit printf -- '\033[33m Installing lazygit\n\033[37m' @@ -98,12 +101,12 @@ rm ~/lazygit && rm ~/lazygit.tar.gz # Install gdu printf -- '\033[33m Installing gdu\n\033[37m' sudo add-apt-repository -y ppa:daniel-milde/gdu -sudo apt update -sudo apt install -y gdu +sudo nala update +sudo nala install -y gdu # Install ruby 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 # Install bottom @@ -115,23 +118,23 @@ rm ~/bottom_0.9.1_amd64.deb # Install go printf -- '\033[33m Installing go\n\033[37m' -sudo apt install -y golang +sudo nala install -y golang # Install php 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 printf -- '\033[33m Installing luarocks\n\033[37m' -sudo apt install -y luarocks +sudo nala install -y luarocks # Install composer printf -- '\033[33m Installing composer\n\033[37m' -sudo apt install -y composer +sudo nala install -y composer # Install java printf -- '\033[33m Installing java\n\033[37m' -sudo apt install -y default-jdk +sudo nala install -y default-jdk # Install julia 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' cd ~ curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - -sudo apt install -y nodejs +sudo nala install -y nodejs # Install platformio 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' 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 printf -- '\033[33m Symlinking nvim config\n\033[37m' mkdir -p ~/.config/nvim