Skip to content

Instantly share code, notes, and snippets.

@Domkeykong
Forked from tadly/pacaur_install.sh
Last active July 20, 2018 13:15
Show Gist options
  • Select an option

  • Save Domkeykong/128f60be74af20b3a5664d063a7edcc9 to your computer and use it in GitHub Desktop.

Select an option

Save Domkeykong/128f60be74af20b3a5664d063a7edcc9 to your computer and use it in GitHub Desktop.
A simple shell script to quickly / easily install "pacaur" on archlinux
#!/bin/sh
# If you are new to arch, I encourage you to at least read and understand what
# this script does befor blindley running it.
# That's why I didn't make a one-liner out of it so you have an easier time
# reading and understanding it :)
#
# This scripts purpose is purly to save you a few seconds on your new installation.
#
# Enjoy your time on an awesome system. Arch FTW!
# Run the following from a terminal to install pacaur:
# $ curl -s https://gist.githubusercontent.com/KonKeyHD/128f60be74af20b3a5664d063a7edcc9/raw/install_pacaur.sh | bash
#
# Stop immediately if an Error Occurred
set -e
# Ask for user passwort once, see sudo(8).
sudo -v
# Make sure our shiny new arch is up-to-date
echo "Checking for system updates..."
sudo pacman -Syu
# Create a tmp-working-dir and navigate into it
mkdir -p /tmp/pacaur_install
cd /tmp/pacaur_install
# If you didn't install the "base-devel" group,
# we'll need those.
sudo pacman -S binutils make gcc fakeroot pkg-config yajl --noconfirm --needed
# Arch Linux ARM provides a cower package!
# Let's either install 'cower' via pacman, or build it.
if [ ! -n "$(pacman -Qs cower)" ] && [ "$(uname -m)" = 'armv7l' ]; then
sudo pacman -S --needed --noconfirm cower
elif [ ! -n "$(pacman -Qs pacaur)" ]; then
curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=cower
makepkg PKGBUILD --skippgpcheck --install --needed
fi
# Install "pacaur" from AUR
if [ ! -n "$(pacman -Qs pacaur)" ]; then
curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pacaur
makepkg PKGBUILD --syncdeps --install --noconfirm --needed
fi
# Clean up...
cd ~
rm -rf /tmp/pacaur_install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment