Up.
This commit is contained in:
@@ -1,120 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
packages=(
|
||||
curl
|
||||
direnv
|
||||
ranger
|
||||
starship
|
||||
tmux
|
||||
trash-cli
|
||||
unzip
|
||||
wget
|
||||
zip
|
||||
zoxide
|
||||
zsh
|
||||
)
|
||||
|
||||
{{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}}
|
||||
|
||||
echo -e "\033[0;32m>>>>> Begin Arch/Manjaro Linux packages installation <<<<<\033[0m"
|
||||
|
||||
## Update system
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo pacman -Syu --noconfirm
|
||||
{{- else }}
|
||||
pacman -Syu --noconfirm
|
||||
{{- end}}
|
||||
|
||||
## Install yay
|
||||
if [ ! $(command -v yay) ]; then
|
||||
echo "installing yay"
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo pacman -S --needed --noconfirm git base-devel
|
||||
{{- else}}
|
||||
pacman -S --needed --noconfirm git base-devel
|
||||
{{- end }}
|
||||
git clone https://aur.archlinux.org/yay.git /tmp/yay
|
||||
cd /tmp/yay
|
||||
makepkg -si --noconfirm
|
||||
rm -rf /tmp/yay
|
||||
fi
|
||||
|
||||
## Install packages
|
||||
for package in ${packages[@]}; do
|
||||
if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then
|
||||
echo "installing ${package}..."
|
||||
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo yay -S --noconfirm $package
|
||||
{{- else }}
|
||||
yay -S --noconfirm $package
|
||||
{{- end }}
|
||||
fi
|
||||
done
|
||||
|
||||
echo -e "\033[0;32m>>>>> Finish Arch/Manjaro Linux packages installation <<<<<\033[0m"
|
||||
|
||||
{{ else if (eq .chezmoi.osRelease.id "debian" "ubuntu") -}}
|
||||
|
||||
echo -e "\033[0;32m>>>>> Begin Debian/Ubuntu Linux packages installation <<<<<\033[0m"
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
## Add repositories and update system
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo -E apt-get install --yes --no-install-recommends --ignore-missing lsb-release gpg
|
||||
curl -fsSL 'https://proget.makedeb.org/debian-feeds/makedeb.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/makedeb-archive-keyring.gpg 1> /dev/null
|
||||
echo 'deb [signed-by=/usr/share/keyrings/makedeb-archive-keyring.gpg arch=all] https://proget.makedeb.org/ makedeb main' | sudo tee /etc/apt/sources.list.d/makedeb.list
|
||||
curl -fsSL 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
|
||||
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
|
||||
sudo -E apt update
|
||||
sudo -E apt upgrade --yes
|
||||
sudo -E apt-get install --yes --no-install-recommends --ignore-missing mist
|
||||
{{- else }}
|
||||
apt-get install --yes --no-install-recommends --ignore-missing lsb-release gpg
|
||||
curl -fsSL 'https://proget.makedeb.org/debian-feeds/makedeb.pub' | gpg --dearmor | tee /usr/share/keyrings/makedeb-archive-keyring.gpg 1> /dev/null
|
||||
echo 'deb [signed-by=/usr/share/keyrings/makedeb-archive-keyring.gpg arch=all] https://proget.makedeb.org/ makedeb main' | tee /etc/apt/sources.list.d/makedeb.list
|
||||
curl -fsSL 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
|
||||
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | tee /etc/apt/sources.list.d/prebuilt-mpr.list
|
||||
apt update
|
||||
apt upgrade --yes
|
||||
apt-get install --yes --no-install-recommends --ignore-missing mist
|
||||
{{- end}}
|
||||
|
||||
mist update
|
||||
|
||||
## Install packages
|
||||
packages=(${packages[@]//starship/makedeb})
|
||||
packages+=(
|
||||
apt-utils
|
||||
autoconf
|
||||
automake
|
||||
cmake
|
||||
doxygen
|
||||
libtool
|
||||
libtool-bin
|
||||
mist
|
||||
ninja-build
|
||||
pkg-config
|
||||
)
|
||||
|
||||
for package in ${packages[@]}; do
|
||||
echo "installing ${package}..."
|
||||
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package
|
||||
{{- else }}
|
||||
apt-get install --yes --no-install-recommends --ignore-missing $package
|
||||
{{- end }}
|
||||
done
|
||||
|
||||
## curl -sS https://starship.rs/install.sh | sh
|
||||
|
||||
mist install starship-bin
|
||||
|
||||
echo -e "\033[0;32m>>>>> Finish Debian/Ubuntu Linux packages installation <<<<<\033[0m"
|
||||
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user