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