Merge branch 'main' of https://git.cmtec.se/cm/linuxbox
This commit is contained in:
commit
22279adb21
133
update_ubuntu.sh
133
update_ubuntu.sh
@ -72,7 +72,17 @@ fi
|
||||
|
||||
# Install system packages
|
||||
printf -- '\033[33m Installing system packages\n\033[37m'
|
||||
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
|
||||
mkdir -p ~/.local/bin
|
||||
sudo apt install -y gawk imagemagick gpg ninja-build gettext cmake unzip curl build-essential libssl-dev libffi-dev file libudev-dev pkg-config locales btop ncdu ranger timeshift
|
||||
ln -sf ~/linuxbox/bashrc ~/.bashrc
|
||||
if [ "$WSL" == "yes" ]; then
|
||||
ln -sf ~/linuxbox/gitconfig.work ~/.gitconfig
|
||||
else
|
||||
ln -sf ~/linuxbox/gitconfig ~/.gitconfig
|
||||
mkdir -p ~/.config/alacritty
|
||||
ln -sf ~/linuxbox/config/alacritty/alacritty.toml ~/.config/alacritty/alacritty.toml
|
||||
fi
|
||||
ln -sf ~/linuxbox/update_wrapper.sh ~/.local/bin/update
|
||||
|
||||
# Install brew
|
||||
printf -- '\033[33m Installing Homebrew\n\033[37m'
|
||||
@ -94,6 +104,17 @@ printf -- '\033[33m Setup locals\n\033[37m'
|
||||
sudo locale-gen "en_US.UTF-8"
|
||||
sudo update-locale LANG=en_US.UTF-8
|
||||
|
||||
# Install rust
|
||||
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
|
||||
if [ "$WSL" == "yes" ]; then
|
||||
source "$HOME/.cargo/env"
|
||||
fi
|
||||
rustup self update
|
||||
rustup update stable
|
||||
rustup default stable
|
||||
|
||||
# Install python
|
||||
printf -- '\033[33m Installing python\n\033[37m'
|
||||
sudo apt install -y python3 python3-pip python3-venv python3-dev pipx
|
||||
@ -103,12 +124,30 @@ else
|
||||
sudo apt install -y python3-pynvim
|
||||
fi
|
||||
|
||||
# Install node
|
||||
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
|
||||
npm config set prefix "${HOME}/.npm"
|
||||
|
||||
# Install fzf
|
||||
printf -- '\033[33m Installing fzf\n\033[37m'
|
||||
if [ -d ~/.fzf ]; then rm -rf ~/.fzf; fi
|
||||
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
||||
~/.fzf/install --all
|
||||
|
||||
# Install tmux
|
||||
printf -- '\033[33m Installing tmux\n\033[37m'
|
||||
sudo apt install -y libevent-dev ncurses-dev build-essential bison pkg-config
|
||||
cd ~
|
||||
wget https://github.com/tmux/tmux/releases/download/3.3a/tmux-3.3a.tar.gz
|
||||
tar xzvf tmux-3.3a.tar.gz
|
||||
cd tmux-3.3a
|
||||
./configure
|
||||
make && sudo make install
|
||||
ln -sf ~/linuxbox/tmux.conf ~/.tmux.conf
|
||||
|
||||
# Install VirtualHere client
|
||||
printf -- '\033[33m Installing VirtualHere client\n\033[37m'
|
||||
cd ~
|
||||
@ -139,6 +178,7 @@ fi
|
||||
|
||||
# Install neovim
|
||||
printf -- '\033[33m Installing neovim\n\033[37m'
|
||||
sudo apt install -y bat fd-find
|
||||
cd ~
|
||||
if [ -d ~/neovim ]; then rm -rf ~/neovim; fi
|
||||
git clone https://github.com/neovim/neovim
|
||||
@ -146,15 +186,14 @@ cd neovim && git checkout stable
|
||||
make CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cd build && cpack -G DEB && sudo dpkg -i nvim*.deb
|
||||
if [ -d ~/neovim ]; then rm -rf ~/neovim; fi
|
||||
mkdir -p ~/.config/nvim
|
||||
ln -sf ~/linuxbox/config/nvim/init.lua ~/.config/nvim/init.lua
|
||||
|
||||
# Install caffeine
|
||||
if [ "$WSL" == "no" ]; then
|
||||
printf -- '\033[33m Installing caffeine\n\033[37m'
|
||||
sudo apt install -y caffeine
|
||||
fi
|
||||
# Install fd
|
||||
printf -- '\033[33m Installing fd\n\033[37m'
|
||||
sudo apt install -y fd-find
|
||||
|
||||
# Install lazygit
|
||||
printf -- '\033[33m Installing lazygit\n\033[37m'
|
||||
@ -164,6 +203,8 @@ curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/lates
|
||||
tar xf lazygit.tar.gz lazygit
|
||||
sudo install lazygit /usr/local/bin
|
||||
rm ~/lazygit && rm ~/lazygit.tar.gz
|
||||
mkdir -p ~/.config/lazygit
|
||||
ln -sf ~/linuxbox/config/lazygit/config.yml ~/.config/lazygit/config.yml
|
||||
|
||||
# Install gdu
|
||||
printf -- '\033[33m Installing gdu\n\033[37m'
|
||||
@ -220,13 +261,6 @@ sudo ln -sf /opt/julia-1.9.0/bin/julia /usr/local/bin/julia
|
||||
rm julia-1.9.0-linux-x86_64.tar.gz*
|
||||
rm -rf julia-1.9.0
|
||||
|
||||
# Install node
|
||||
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
|
||||
npm config set prefix "${HOME}/.npm"
|
||||
|
||||
# Install ble.sh
|
||||
printf -- '\033[33m Installing ble.sh\n\033[37m'
|
||||
if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
|
||||
@ -234,6 +268,7 @@ cd ~
|
||||
git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
|
||||
make -C ble.sh install PREFIX=~/.local
|
||||
if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
|
||||
ln -sf ~/linuxbox/blerc ~/.blerc
|
||||
|
||||
# Install platformio
|
||||
printf -- '\033[33m Installing platformio\n\033[37m'
|
||||
@ -248,23 +283,14 @@ fi
|
||||
printf -- '\033[33m Installing neovim for node\n\033[37m'
|
||||
sudo npm install -g neovim
|
||||
|
||||
# Install rust
|
||||
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
|
||||
if [ "$WSL" == "yes" ]; then
|
||||
source "$HOME/.cargo/env"
|
||||
fi
|
||||
rustup self update
|
||||
rustup update stable
|
||||
rustup default stable
|
||||
|
||||
# Install rust embedded stuff
|
||||
printf -- '\033[33m Installing Rust embedded stuff\n\033[37m'
|
||||
cd ~
|
||||
rustup target add thumbv6m-none-eabi
|
||||
cargo install elf2uf2-rs --locked
|
||||
cargo install probe-run
|
||||
mkdir -p ~/.local/bin
|
||||
ln -sf ~/linuxbox/pico-load.sh ~/.local/bin/pico-load
|
||||
|
||||
# Install tree sitter cli
|
||||
printf -- '\033[33m Installing tree sitter cli\n\033[37m'
|
||||
@ -286,7 +312,9 @@ cargo install zoxide --locked
|
||||
# Install starship
|
||||
printf -- '\033[33m Installing starship\n\033[37m'
|
||||
cargo install starship --locked
|
||||
ln -sf ~/linuxbox/config/starship.toml ~/.config/starship.toml
|
||||
|
||||
printf -- '\033[33m Installing LSP servers\n\033[37m'
|
||||
# Install LSP servers
|
||||
printf -- '\033[33m Installing LSP servers\n\033[37m'
|
||||
rustup component add rust-analyzer clippy rustfmt
|
||||
@ -298,6 +326,7 @@ pipx install isort
|
||||
pipx install mdformat
|
||||
brew install lua-language-server marksman
|
||||
cargo install stylua
|
||||
ln -sf ~/linuxbox/luacheckrc ~/.luacheckrc
|
||||
|
||||
# *** Desktop applications ***
|
||||
if [ "$WSL" == "no" ]; then
|
||||
@ -374,67 +403,7 @@ if [ "$WSL" == "no" ]; then
|
||||
sudo apt install -y pavucontrol helvum
|
||||
fi
|
||||
|
||||
# Install timeshift
|
||||
printf -- '\033[33m Installing Timeshift\n\033[37m'
|
||||
sudo apt install -y timeshift
|
||||
|
||||
fi
|
||||
fi
|
||||
# *** Dotfile symlinking ***
|
||||
printf -- '\033[32m *** Dotfile symlinking ***\n\033[37m'
|
||||
|
||||
if [ "$WSL" == "no" ]; then
|
||||
# Symlink wezterm config
|
||||
printf -- '\033[33m Symlinking alacritty config\n\033[37m'
|
||||
mkdir -p ~/.config/alacritty
|
||||
ln -sf ~/linuxbox/config/alacritty/alacritty.toml ~/.config/alacritty/alacritty.toml
|
||||
fi
|
||||
# Symlink nvim config
|
||||
printf -- '\033[33m Symlinking nvim config\n\033[37m'
|
||||
mkdir -p ~/.config/nvim
|
||||
ln -sf ~/linuxbox/config/nvim/init.lua ~/.config/nvim/init.lua
|
||||
|
||||
# Symlink git config
|
||||
printf -- '\033[33m Symlinking git config\n\033[37m'
|
||||
if [ "$WSL" == "yes" ]; then
|
||||
ln -sf ~/linuxbox/gitconfig.work ~/.gitconfig
|
||||
else
|
||||
ln -sf ~/linuxbox/gitconfig ~/.gitconfig
|
||||
fi
|
||||
|
||||
# Symlink tmux config
|
||||
printf -- '\033[33m Symlinking tmux config\n\033[37m'
|
||||
ln -sf ~/linuxbox/tmux.conf ~/.tmux.conf
|
||||
|
||||
# Symlink lazygit config
|
||||
printf -- '\033[33m Symlinking lazygit config\n\033[37m'
|
||||
mkdir -p ~/.config/lazygit
|
||||
ln -sf ~/linuxbox/config/lazygit/config.yml ~/.config/lazygit/config.yml
|
||||
|
||||
# Symlink starsihp config
|
||||
printf -- '\033[33m Symlinking starship config\n\033[37m'
|
||||
ln -sf ~/linuxbox/config/starship.toml ~/.config/starship.toml
|
||||
|
||||
# Symlink luacheck config
|
||||
printf -- '\033[33m Symlinking luacheck config\n\033[37m'
|
||||
ln -sf ~/linuxbox/luacheckrc ~/.luacheckrc
|
||||
|
||||
# Symlink rp2040 flash script
|
||||
printf -- '\033[33m Symlinking rp2040 flash script\n\033[37m'
|
||||
mkdir -p ~/.local/bin
|
||||
ln -sf ~/linuxbox/pico-load.sh ~/.local/bin/pico-load
|
||||
|
||||
# Symlink blerc
|
||||
printf -- '\033[33m Symlinking blerc config\n\033[37m'
|
||||
ln -sf ~/linuxbox/blerc ~/.blerc
|
||||
|
||||
# Symlink update script
|
||||
printf -- '\033[33m Symlinking update wrapper\n\033[37m'
|
||||
mkdir -p ~/.local/bin
|
||||
ln -sf ~/linuxbox/update_wrapper.sh ~/.local/bin/update
|
||||
|
||||
# Symlink bashrc
|
||||
printf -- '\033[33m Symlinking bashrc config\n\033[37m'
|
||||
ln -sf ~/linuxbox/bashrc ~/.bashrc
|
||||
|
||||
printf -- '\033[32m \n\n***** Update complete! Please restart your terminal. *****\n\n\033[37m'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user