Added logo to update scripts

This commit is contained in:
Christoffer Martinsson 2024-11-25 11:19:27 +01:00
parent 1244b56e8e
commit fd5e9640bb
2 changed files with 103 additions and 76 deletions

View File

@ -1,9 +1,24 @@
#!/bin/bash
set -e
# Install system packages
printf -- '\033[33m Installing system packages\n\033[37m'
echo -e ' \e[H\e[2J
\e[0;34m.
\e[0;34m/ \
\e[0;34m/ \ \e[1;37m # \e[1;34m| *
\e[0;34m/^. \ \e[1;37m a##e #%" a#"e 6##% \e[1;34m| | |-^-. | | \ /
\e[0;34m/ .-. \ \e[1;37m.oOo# # # # # \e[1;34m| | | | | | X
\e[0;34m/ ( ) _\ \e[1;37m%OoO# # %#e" # # \e[1;34m| | | | ^._.| / \ \e[0;37mTM
\e[1;34m/ _.~ ~._^\
\e[1;34m/.^ ^.\ \e[0;37mTM
\e[1;32mCMtec CMBOX install/Update script\e[0;37m
'
# Update all pacman packages
printf -- '\033[33m Updating pacman packages\n\033[37m'
sudo pacman -Suyy --noconfirm
# Update all AUR packages
printf -- '\033[33m Updating AUR packages\n\033[37m'
if pacman -Qs yay >/dev/null; then
yay --noconfirm --aur
else
@ -16,20 +31,63 @@ else
cd ~
if [ -d ~/yay-bin ]; then rm -rf ~/yay-bin; fi
fi
sudo pacman --noconfirm --needed -S waybar wofi hyprland hyprlock polkit-gnome xorg-xhost gnome-keyring pipewire git base-devel cmake gawk wget gettext unzip curl tmux btop ncdu ranger qt5ct qt6ct gnome-themes-extra qt5-wayland qt6-wayland lxappearance
# Update all Flatpak packages
printf -- '\033[33m Updating Flatpak packages\n\033[37m'
if pacman -Qs flatpak >/dev/null; then
flatpak update -y
else
sudo pacman --noconfirm --needed -S flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub com.github.tchx84.Flatseal
fi
yay --noconfirm -S --needed --aur adwaita-qt5-git
yay --noconfirm -S --needed --aur adwaita-qt6-git
yay --noconfirm -S --needed --aur pam_autologin
sudo /bin/cp -rf ~/code_server/login /etc/pam.d/login
sudo /bin/cp -rf ~/code_server/getty@.service /usr/lib/systemd/system/getty@.service
sudo touch /etc/security/autologin.conf
# Install initial system packages
printf -- '\033[33m Installing initial system packages\n\033[37m'
sudo pacman --noconfirm --needed -S base-devel cmake gawk wget gettext unzip curl
# Setup locals
printf -- '\033[33m Setup locals\n\033[37m'
sudo localectl set-locale LANG=en_US.UTF-8
# Install git
printf -- '\033[33m Installing git\n\033[37m'
sudo pacman --noconfirm --needed -S git
ln -sf ~/code_server/gitconfig ~/.gitconfig
# Install hyprland
printf -- '\033[33m Installing hyprland\n\033[37m'
sudo pacman --noconfirm --needed -S dunst waybar rofi hyprland hyprlock polkit-gnome xorg-xhost gnome-keyring pipewire qt5ct qt6ct gnome-themes-extra qt5-wayland qt6-wayland lxappearance
yay --noconfirm -S --needed --aur adwaita-qt5-git
yay --noconfirm -S --needed --aur adwaita-qt6-git
mkdir -p ~/.config/hypr
ln -sf ~/code_server/config/hypr/hyprland.conf ~/.config/hypr/hyprland.conf
# Install autologin
printf -- '\033[33m Installing autologin\n\033[37m'
yay --noconfirm -S --needed --aur pam_autologin
sudo /bin/cp -rf ~/code_server/login /etc/pam.d/login
sudo /bin/cp -rf ~/code_server/getty@.service /usr/lib/systemd/system/getty@.service
sudo touch /etc/security/autologin.conf
# Install btop
printf -- '\033[33m Installing btop\n\033[37m'
sudo pacman --noconfirm --needed -S btop
# Install ranger
printf -- '\033[33m Installing ranger\n\033[37m'
sudo pacman --noconfirm --needed -S ranger
# Install kitty
printf -- '\033[33m Installing kitty\n\033[37m'
sudo pacman --noconfirm --needed -S kitty
mkdir -p ~/.config/kitty
ln -sf ~/code_server/config/kitty/kitty.conf ~/.config/kitty/kitty.conf
# Install tmux
printf -- '\033[33m Installing tmux\n\033[37m'
sudo pacman --noconfirm --needed -S tmux
ln -sf ~/code_server/tmux.conf ~/.tmux.conf
# Install python
printf -- '\033[33m Installing python\n\033[37m'
sudo pacman --noconfirm --needed -S python python-pip python-pipx python-pipenv python-pynvim
@ -70,6 +128,12 @@ fi
# Install neovim
printf -- '\033[33m Installing neovim\n\033[37m'
sudo pacman --noconfirm --needed -S neovim
mkdir -p ~/.config/nvim
ln -sf ~/code_server/config/nvim/init.lua ~/.config/nvim/init.lua
ln -sf ~/code_server/clang-format ~/.clang-format
ln -sf ~/code_server/luacheckrc ~/.luacheckrc
mkdir -p ~/.local/bin
ln -sf ~/code_server/pico-load.sh ~/.local/bin/pico-load
# Install fd
printf -- '\033[33m Installing fd\n\033[37m'
@ -83,6 +147,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 ~/code_server/config/lazygit/config.yml ~/.config/lazygit/config.yml
# Install gdu
printf -- '\033[33m Installing gdu\n\033[37m'
@ -132,6 +198,7 @@ git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyo
#make -C ble.sh install PREFIX=~/.local
make -C ble.sh install
if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
ln -sf ~/code_server/blerc ~/.blerc
# Install platformio
printf -- '\033[33m Installing platformio\n\033[37m'
@ -174,30 +241,25 @@ cargo install zoxide --locked
# Install starship
printf -- '\033[33m Installing starship\n\033[37m'
cargo install starship --locked
ln -sf ~/code_server/config/starship.toml ~/.config/starship.toml
# *** Desktop applications ***
printf -- '\033[32m *** Desktop applications ***\n\033[37m'
# Install flatpak
printf -- '\033[33m Installing desktop dep.\n\033[37m'
sudo pacman --noconfirm --needed -S 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
# Install Krita
printf -- '\033[33m Installing Krita\n\033[37m'
flatpak install -y flathub org.kde.krita
# Install KiCad
printf -- '\033[33m Installing KiCad\n\033[37m'
flatpak install -y flathub org.kicad.KiCad
# Install FreeCad
printf -- '\033[33m Installing FreeCad\n\033[37m'
flatpak install -y flathub org.freecadweb.FreeCAD
# Install Moonlight
printf -- '\033[33m Installing Moonlight\n\033[37m'
flatpak install -y flathub com.moonlight_stream.Moonlight
# Install DrawIo
printf -- '\033[33m Installing DrawIo\n\033[37m'
flatpak install -y flathub com.jgraph.drawio.desktop
@ -251,58 +313,6 @@ sudo udevadm trigger
sudo modprobe uinput
sudo setcap cap_sys_admin+p $(readlink -f $(which sunshine))
# *** Dotfile symlinking ***
printf -- '\033[32m *** Dotfile symlinking ***\n\033[37m'
# Symlink hyperland config
printf -- '\033[33m Symlinking hyperland config\n\033[37m'
mkdir -p ~/.config/hypr
ln -sf ~/code_server/config/hypr/hyprland.conf ~/.config/hypr/hyprland.conf
# Symlink kitty config
printf -- '\033[33m Symlinking kitty config\n\033[37m'
mkdir -p ~/.config/kitty
ln -sf ~/code_server/config/kitty/kitty.conf ~/.config/kitty/kitty.conf
# Symlink nvim config
printf -- '\033[33m Symlinking nvim config\n\033[37m'
mkdir -p ~/.config/nvim
ln -sf ~/code_server/config/nvim/init.lua ~/.config/nvim/init.lua
# Symlink git config
printf -- '\033[33m Symlinking git config\n\033[37m'
ln -sf ~/code_server/gitconfig ~/.gitconfig
# Symlink tmux config
printf -- '\033[33m Symlinking tmux config\n\033[37m'
ln -sf ~/code_server/tmux.conf ~/.tmux.conf
# Symlink clang-format config
printf -- '\033[33m Symlinking clang-format config\n\033[37m'
ln -sf ~/code_server/clang-format ~/.clang-format
# Symlink lazygit config
printf -- '\033[33m Symlinking lazygit config\n\033[37m'
mkdir -p ~/.config/lazygit
ln -sf ~/code_server/config/lazygit/config.yml ~/.config/lazygit/config.yml
# Symlink starsihp config
printf -- '\033[33m Symlinking starship config\n\033[37m'
ln -sf ~/code_server/config/starship.toml ~/.config/starship.toml
# Symlink luacheck config
printf -- '\033[33m Symlinking luacheck config\n\033[37m'
ln -sf ~/code_server/luacheckrc ~/.luacheckrc
# Symlink rp2040 flash script
printf -- '\033[33m Symlinking rp2040 flash script\n\033[37m'
mkdir -p ~/.local/bin
ln -sf ~/code_server/pico-load.sh ~/.local/bin/pico-load
# Symlink blerc
printf -- '\033[33m Symlinking blerc config\n\033[37m'
ln -sf ~/code_server/blerc ~/.blerc
# Symlink update script
printf -- '\033[33m Symlinking update wrapper\n\033[37m'
mkdir -p ~/.local/bin

View File

@ -2,12 +2,9 @@
set -e
if [ -f /etc/os-release ]; then
# freedesktop.org and systemd
. /etc/os-release
OS=$NAME
VER=$VERSION_ID
else
OS="none"
VER="0"
fi
@ -23,6 +20,26 @@ else
WSL="no"
fi
echo -e ' \e[H\e[2J
\e[0;31m .-.\e[0;37m
\e[0;31m .-"``(|||)\e[0;37m
\e[0;31m ,`\ \ `-`.\e[0;37m 88 88
\e[0;31m / \ "``-. `\e[0;37m 88 88
\e[0;31m .-. , `___:\e[0;37m 88 88 88,888, 88 88 ,88888, 88888 88 88
\e[0;31m (:::) : ___ \e[0;37m 88 88 88 88 88 88 88 88 88 88 88
\e[0;31m `-` ` , :\e[0;37m 88 88 88 88 88 88 88 88 88 88 88
\e[0;31m \ / ,..-` ,\e[0;37m 88 88 88 88 88 88 88 88 88 88 88
\e[0;31m `./ / .-.`\e[0;37m "88888" "88888" "88888" 88 88 "8888 "88888"
\e[0;31m `-..-( )\e[0;37m
\e[0;31m `-`\e[0;37m
\e[1;32mCMtec Ubuntu install/Update script\e[0;37m
\e[0;35mUbuntu version = '$VER'\e[0;37m
\e[0;35mDesktop = '$DESKTOP'\e[0;37m
\e[0;35mWSL = '$WSL'\e[0;37m
'
# *** System applications ***
printf -- '\033[32m *** System applications ***\n\033[37m'