Arch: switch to new AUR package manager (pacaur => yay)
This commit is contained in:
parent
79cfd9a787
commit
8145e860d4
|
@ -8,12 +8,12 @@ install() {
|
|||
elif ! sudo pacman -Syu --noconfirm; then
|
||||
>&2 echo "Could not update pacman"
|
||||
return 2
|
||||
elif ! _is_callable pacaur; then
|
||||
elif ! _is_callable yay; then
|
||||
>&2 echo "Could not find pacaur"
|
||||
return 3
|
||||
fi
|
||||
|
||||
pacaur --needed --noconfirm --noedit -S \
|
||||
yay --needed --noconfirm -S \
|
||||
xorg-server xorg-xrandr xorg-xinit xorg-xlsfonts xorg-xfd xdotool \
|
||||
lightdm lightdm-mini-greeter \
|
||||
bspwm sxhkd compton dunst xcb-proto polybar libnotify \
|
||||
|
|
|
@ -5,8 +5,8 @@ if [[ $1 == "1" ]]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
pac=$(checkupdates | wc -l)
|
||||
aur=$(cower -u | wc -l)
|
||||
pac=$(checkupdates 2>/dev/null | wc -l)
|
||||
aur=$(yay -Pn 2>/dev/null)
|
||||
|
||||
[[ -f /tmp/polybar-updates ]] && last=$(</tmp/polybar-updates)
|
||||
check=$((pac + aur))
|
||||
|
|
|
@ -6,7 +6,7 @@ if command -v aseprite >/dev/null; then
|
|||
fi
|
||||
|
||||
set -e
|
||||
pacaur --needed --noconfirm --noedit -S ninja cmake libxcursor
|
||||
yay --needed --noconfirm -S ninja cmake libxcursor
|
||||
rm -rf /tmp/aseprite
|
||||
if git clone --recursive https://github.com/aseprite/aseprite /tmp/aseprite; then
|
||||
mkdir /tmp/aseprite/build && cd /tmp/aseprite/build
|
||||
|
|
|
@ -13,31 +13,26 @@ install() {
|
|||
# Core essentials
|
||||
sudo pacman --needed --noconfirm -S wget git curl tree rsync dnsutils
|
||||
|
||||
# Set up pacaur (AUR helper)
|
||||
if ! _is_callable pacaur; then
|
||||
TEMP="$(mktemp -d)"
|
||||
pushd $TEMP
|
||||
for pkg in cower pacaur; do
|
||||
if [[ ! "$(pacman -Qs $pkg)" ]]; then
|
||||
curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=$pkg && \
|
||||
makepkg PKGBUILD --needed --noconfirm --skippgpcheck -sri
|
||||
fi
|
||||
done
|
||||
# Set up yay (AUR helper)
|
||||
if ! _is_callable yay; then
|
||||
git clone https://aur.archlinux.org/yay.git /tmp/yay
|
||||
pushd /tmp/yay
|
||||
makepkg -si
|
||||
popd
|
||||
rm -rf $TEMP
|
||||
rm -rf /tmp/yay
|
||||
|
||||
if ! _is_callable pacaur; then
|
||||
>&2 echo "Pacaur was not successfully installed"
|
||||
if ! _is_callable yay; then
|
||||
>&2 echo "Yay was not successfully installed"
|
||||
return 3
|
||||
fi
|
||||
fi
|
||||
|
||||
pacaur --needed --noconfirm --noedit -S ripgrep the_silver_searcher bc cronie
|
||||
yay --needed --noconfirm -S ripgrep the_silver_searcher bc cronie
|
||||
sudo systemctl enable cronie
|
||||
}
|
||||
|
||||
update() {
|
||||
_is_callable pacaur && local pac=pacaur
|
||||
_is_callable yay && local pac=yay
|
||||
${pac:-sudo pacman} -Syu --noconfirm
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,8 @@ alias jc=journalctl
|
|||
alias ssc='sudo systemctl'
|
||||
alias ufw='sudo ufw'
|
||||
|
||||
alias pac=pacaur
|
||||
alias pacu='pacaur -Syu' # upgrade
|
||||
alias pacc='pacaur -Sc' # clean pacman
|
||||
alias paco='pacaur -Qtdq' # orphaned packages
|
||||
alias yayc='yay -Sc' # clean pacman
|
||||
alias yayo='yay -Qtdq' # orphaned packages
|
||||
|
||||
alias reboot='sudo systemctl reboot'
|
||||
alias shutdown='sudo systemctl poweroff'
|
||||
|
|
|
@ -8,7 +8,7 @@ install() {
|
|||
brew install cmake bear gdb
|
||||
echo "Note: gdb requires additional setup on MacOS, see https://sourceware.org/gdb/wiki/BuildingOnDarwin"
|
||||
;;
|
||||
arch) pacaur --needed --noconfirm -S cmake bear gdb ;;
|
||||
arch) yay --needed --noconfirm -S cmake bear gdb ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ source env.zsh
|
|||
install() {
|
||||
case $(_os) in
|
||||
macos) brew install go ;;
|
||||
arch) pacaur --needed --noconfirm -S go ;;
|
||||
arch) yay --needed --noconfirm -S go ;;
|
||||
esac
|
||||
|
||||
update
|
||||
|
|
|
@ -8,7 +8,7 @@ install() {
|
|||
# The arch linux + haskell situation is a mess. To ensure haskell packages
|
||||
# installed via pacman and ones installed via stack/cabal leave each other
|
||||
# alone, we need ghc-static + stack-bin.
|
||||
arch) pacaur --needed --noedit --noconfirm -S ghc-static stack-bin ;;
|
||||
arch) yay --needed --noconfirm -S ghc-static stack-bin ;;
|
||||
esac
|
||||
stack config set system-ghc --global true
|
||||
stack setup && stack install ShellCheck
|
||||
|
|
|
@ -6,7 +6,7 @@ install() {
|
|||
# TODO Install android SDK
|
||||
case $(_os) in
|
||||
macos) brew cask install java gradle ;;
|
||||
arch) pacaur --needed --noedit --noconfirm -S jdk8-openjdk gradle ;;
|
||||
arch) yay --needed --noconfirm -S jdk8-openjdk gradle ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ install() {
|
|||
_ensure_repo madumlao/phpenv $PHPENV_ROOT
|
||||
_ensure_repo php-build/php-build $PHPENV_ROOT/plugins/php-build
|
||||
case $(_os) in
|
||||
arch) pacaur --needed --noconfirm --noedit -S libmcrypt tidy ;;
|
||||
arch) yay --needed --noconfirm -S libmcrypt tidy ;;
|
||||
macos) brew install libmcrypt tidy-html5 ;;
|
||||
esac
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ source env.zsh
|
|||
install() {
|
||||
case $(_os) in
|
||||
macos) brew install rustup ;;
|
||||
arch) pacaur --needed --noconfirm -S rustup ;;
|
||||
arch) yay --needed --noconfirm -S rustup ;;
|
||||
esac
|
||||
rustup install stable
|
||||
rustup component add rust-src
|
||||
|
|
|
@ -4,7 +4,7 @@ source ${0:A:h}/../../deploy
|
|||
install() {
|
||||
case $(_os) in
|
||||
macos) brew install editorconfig ;;
|
||||
arch) pacaur --noedit --needed --noconfirm -S editorconfig-core-c ;;
|
||||
arch) yay --needed --noconfirm -S editorconfig-core-c ;;
|
||||
debian) sudo apt-get install -y editorconfig ;;
|
||||
esac
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ install() {
|
|||
macos) brew tap d12frosted/emacs-plus
|
||||
brew install emacs-plus --without-spacemacs-icon
|
||||
;;
|
||||
arch) pacaur --needed --noconfirm --noedit -S make emacs ;;
|
||||
arch) yay --needed --noconfirm -S make emacs ;;
|
||||
debian) sudo apt-get install -y make emacs ;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ NVIM_INSTALL_DIR="$XDG_CONFIG_HOME/nvim"
|
|||
install() {
|
||||
case $(_os) in
|
||||
macos) _is_callable nvim || brew install neovim ;;
|
||||
arch) pacaur --needed --noconfirm --noedit -S make neovim python-neovim ;;
|
||||
arch) yay --needed --noconfirm -S make neovim python-neovim ;;
|
||||
debian)
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable
|
||||
sudo apt-get install -y neovim
|
||||
|
|
|
@ -6,7 +6,7 @@ VIM_INSTALL_DIR="$XDG_CONFIG_HOME/vim"
|
|||
install() {
|
||||
case $(_os) in
|
||||
macos) _is_callable vim || brew install vim ;;
|
||||
arch) pacaur --needed --noconfirm --noedit -S vim ;;
|
||||
arch) yay --needed --noconfirm -S vim ;;
|
||||
debian) sudo apt-get install -y vim ;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ QUTEBROWSER_HOME=$XDG_CONFIG_HOME/qutebrowser
|
|||
install() {
|
||||
case $(_os) in
|
||||
macos) brew cask install qutebrowser ;;
|
||||
arch) pacaur --needed --noconfirm --noedit -S qutebrowser ;;
|
||||
arch) yay --needed --noconfirm -S qutebrowser ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ install() {
|
|||
case $(_os) in
|
||||
macos) brew install git git-lfs hub diff-so-fancy git-standup git-extras git-flow-avh ;;
|
||||
arch)
|
||||
pacaur --needed --noconfirm --noedit -S git hub \
|
||||
yay --needed --noconfirm -S git hub \
|
||||
git-lfs diff-so-fancy git-standup-git git-extras \
|
||||
gitflow-avh ;;
|
||||
debian)
|
||||
|
|
|
@ -9,7 +9,7 @@ install() {
|
|||
;;
|
||||
linux*)
|
||||
if [[ -f /etc/arch-release ]]; then
|
||||
pacaur --noedit --needed --noconfirm -S offlineimap mu
|
||||
yay --needed --noconfirm -S offlineimap mu
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -4,7 +4,7 @@ source ${0:A:h}/../../deploy
|
|||
install() {
|
||||
case $(_os) in
|
||||
macos) brew install sbdchd/skim/skim ;;
|
||||
arch) pacaur --needed --noconfirm -S skim ;;
|
||||
arch) yay --needed --noconfirm -S skim ;;
|
||||
debian) sudo apt-get install -y skim ;;
|
||||
esac
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue