Updated ubuntu script

This commit is contained in:
Christoffer Martinsson 2024-11-28 08:14:57 +01:00
parent aa317f774e
commit 685fb02b78

View File

@ -44,12 +44,31 @@ echo -e ' \e[H\e[2J
printf -- '\033[32m *** System applications ***\n\033[37m'
# Ubuntu 20.04 workaround
sudo apt -y purge --auto-remove neovim
if [ "$VER" == "20.04" ]; then
sudo apt -y purge --auto-remove neovim
fi
# Update system
printf -- '\033[33m Updating system\n\033[37m'
sudo apt update
sudo apt upgrade -y
if dpkg -s flatpak &>/dev/null; then
flatpak update -y
else
sudo add-apt-repository -y ppa:flatpak/stable
sudo apt update
sudo apt install -y flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub com.github.tchx84.Flatseal
fi
if dpkg -s flatpak &>/dev/null; then
sudo snap refresh
else
sudo apt install -y snap
fi
# Install system packages
printf -- '\033[33m Installing system packages\n\033[37m'
sudo apt update
sudo apt upgrade -y
sudo apt install -y gawk imagemagick gpg ninja-build gettext cmake unzip curl build-essential libssl-dev libffi-dev file tmux libudev-dev pkg-config locales btop ncdu ranger
# Setup locals
@ -68,7 +87,7 @@ fi
# Install fzf
printf -- '\033[33m Installing fzf\n\033[37m'
rm -rf ~/.fzf
if [ -d ~/.fzf ]; then rm -rf ~/.fzf; fi
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --all
source ~/.fzf.bash
@ -184,8 +203,7 @@ printf -- '\033[33m Installing ble.sh\n\033[37m'
if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
cd ~
git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
#make -C ble.sh install PREFIX=~/.local
make -C ble.sh install
make -C ble.sh install PREFIX=~/.local
if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
# Install platformio
@ -205,7 +223,7 @@ sudo npm install -g neovim
printf -- '\033[33m Installing Rust\n\033[37m'
cd ~
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path -y
source "$HOME/.cargo/env"
#source "$HOME/.cargo/env"
rustup self update
rustup update stable
rustup default stable
@ -242,16 +260,6 @@ cargo install starship --locked
printf -- '\033[32m *** Desktop applications ***\n\033[37m'
if [ "$DESKTOP" == "yes" ]; then
# Install flatpak
printf -- '\033[33m Installing desktop dep.\n\033[37m'
sudo add-apt-repository -y ppa:flatpak/stable
sudo apt update
sudo apt install -y flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
printf -- '\033[33m Installing Flatseal\n\033[37m'
flatpak install -y flathub com.github.tchx84.Flatseal
printf -- '\033[33m Installing Krita\n\033[37m'
flatpak install -y flathub org.kde.krita