Skip to content

Instantly share code, notes, and snippets.

@tadly
Last active August 30, 2023 13:15
Show Gist options
  • Save tadly/0e65d30f279a34c33e9b to your computer and use it in GitHub Desktop.
Save tadly/0e65d30f279a34c33e9b to your computer and use it in GitHub Desktop.
A simple shell script to quickly / easily install "pacaur" on archlinux
#!/bin/sh
#
# !!! IMPORTANT !!!
# As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144)
# For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active
# pacaur seems to get occasional updates to fix breaking changes due to pacman updates though.
#
# 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/Tadly/0e65d30f279a34c33e9b/raw/pacaur_install.sh | bash
#
# In case you can't copy&paste you may use this shortend version. Keep in mind that goo.gl
# does tracking and analytics. You have been warned :)
# $ curl -Ls https://goo.gl/cF2iJy | bash
#
# Aforementioned statistics are public and can be accesed here (If you're interested):
# https://goo.gl/#analytics/goo.gl/QYfPju/all_time
# 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 --noconfirm --needed
# Install pacaur dependencies from arch repos
sudo pacman -S expac yajl git --noconfirm --needed
# Install "cower" from AUR
if [ ! -n "$(pacman -Qs cower)" ]; 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 --install --needed
fi
# Clean up...
cd ~
rm -r /tmp/pacaur_install
@tadly
Copy link
Author

tadly commented Jul 19, 2017

@diogovk do you know which packages where missing?
Line 33 should take care of missing packages if base-devel isn't installed. If there's another one I can add it

@cslarson
Copy link

i needed to manually install pkg-config (dependency of cower i think)

@chrisparsons83
Copy link

Confirmed - on a fresh build I needed pkg-config as well. Process worked fine otherwise.

@MPlanting
Copy link

MPlanting commented Jul 24, 2017

Nice script! However, I had to run the script twice in order to install both (cower and pacaur) packages.

Copy link

ghost commented Aug 1, 2017

^ Me too.

@MarcusE1W
Copy link

^ me too

@megufest
Copy link

Awesome work!

@j4cobgarby
Copy link

When I first ran this script I didn't have pacaur but I did have cower. Running

git clone https://aur.archlinux.org/pacaur.git && cd pacaur && makepkg -i && cd -

installed pacaur.
Useful script, nevertheless!

@sara-knezevic
Copy link

Thanks!!!!

@GoliathLabs
Copy link

Greetz,
I just wanted to mention, that you should change pkg-config to pkgconf cause of the recent changes made by arch.
I also created a fork which includes the "patch" and the --color=always flag.
( Fork )

Cheers,

  • TheGoliath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment