mirror of
https://github.com/mitchell/dotfiles.git
synced 2025-12-17 12:27:22 +00:00
defiant
This commit is contained in:
parent
44780e9a9e
commit
06ecb8cf28
15 changed files with 783 additions and 196 deletions
|
|
@ -1,15 +1,11 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
test -e /etc/os-release; and source /etc/os-release
|
||||
|
||||
set -l uname (uname)
|
||||
|
||||
if test $uname = Darwin
|
||||
set -l distro mac
|
||||
else
|
||||
set -l distro $ID
|
||||
function log -a message
|
||||
echo \n"--- $message ---"\n
|
||||
end
|
||||
|
||||
read -P "OS? (arch/debian/fedora/mac) " -l distro
|
||||
|
||||
set -l base_pkgs \
|
||||
fish \
|
||||
git \
|
||||
|
|
@ -17,61 +13,67 @@ set -l base_pkgs \
|
|||
tmux \
|
||||
rsync \
|
||||
curl \
|
||||
less \
|
||||
fzf \
|
||||
mosh \
|
||||
lsd \
|
||||
ripgrep \
|
||||
bat
|
||||
bat \
|
||||
tree-sitter-cli \
|
||||
nodejs \
|
||||
zoxide \
|
||||
git-delta
|
||||
|
||||
set -l mac_pkgs \
|
||||
$base_pkgs \
|
||||
fd \
|
||||
yazi \
|
||||
git-delta \
|
||||
starship
|
||||
yazi
|
||||
|
||||
set -l arch_pkgs \
|
||||
$base_pkgs \
|
||||
fd \
|
||||
yazi \
|
||||
git-delta \
|
||||
starship
|
||||
yazi
|
||||
|
||||
set -l debian_pkgs \
|
||||
$base_pkgs \
|
||||
fd-find
|
||||
|
||||
set -l fedora_pkgs \
|
||||
$base_pkgs \
|
||||
fd-find
|
||||
|
||||
switch $distro
|
||||
case mac
|
||||
log 'Installing packages with Homebrew'
|
||||
brew install $mac_pkgs
|
||||
case arch
|
||||
log 'Installing Pikaur'
|
||||
log 'Installing paru'
|
||||
|
||||
install_pkgs --needed base-devel
|
||||
sudo pacman --sync --needed --noconfirm base-devel rustup
|
||||
and rustup default stable
|
||||
or return $status
|
||||
|
||||
set -l cwd (pwd)
|
||||
and set -l tmp_dir (mktemp --directory)
|
||||
or return $status
|
||||
|
||||
git clone https://aur.archlinux.org/pikaur.git $tmp_dir
|
||||
git clone https://aur.archlinux.org/paru.git $tmp_dir
|
||||
and cd $tmp_dir
|
||||
and makepkg --clean --install --rmdeps --syncdeps --noconfirm
|
||||
and makepkg --syncdeps --install --noconfirm
|
||||
and cd $cwd
|
||||
or return $status
|
||||
|
||||
log 'Installing packages with Pikaur '
|
||||
log 'Installing packages with paru'
|
||||
|
||||
pikaur --sync --refresh --sysupgrade --noconfirm
|
||||
and pikaur --sync --noconfirm $arch_pkgs
|
||||
paru --sync --refresh --sysupgrade --noconfirm
|
||||
and paru --sync --noconfirm $arch_pkgs
|
||||
case debian
|
||||
log 'Installing packages with APT'
|
||||
sudo apt-get --quiet --yes update
|
||||
and sudo apt-get --quiet --yes upgrade
|
||||
and sudo apt-get --quiet --yes install $debian_pkgs
|
||||
end
|
||||
|
||||
function log -a message
|
||||
echo \n"--- $message ---"\n
|
||||
case fedora
|
||||
log 'Installing packages with DNF'
|
||||
sudo dnf upgrade --assumeyes
|
||||
and sudo dnf --assumeyes install $fedora_pkgs
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue