This commit is contained in:
mitchell 2025-10-19 02:42:39 -04:00
parent 44780e9a9e
commit 78d9f03d3b
8 changed files with 710 additions and 50 deletions

View file

@ -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/mac) " -l distro
set -l base_pkgs \
fish \
git \
@ -21,7 +17,11 @@ set -l base_pkgs \
mosh \
lsd \
ripgrep \
bat
bat \
tree-sitter-cli \
nodejs \
zoxide \
less
set -l mac_pkgs \
$base_pkgs \
@ -46,32 +46,28 @@ switch $distro
log 'Installing packages with Homebrew'
brew install $mac_pkgs
case arch
log 'Installing Pikaur'
log 'Installing yay'
install_pkgs --needed base-devel
sudo pacman --sync --needed --noconfirm base-devel
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/yay.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 yay'
pikaur --sync --refresh --sysupgrade --noconfirm
and pikaur --sync --noconfirm $arch_pkgs
yay --sync --refresh --sysupgrade --noconfirm
and yay --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
end