summaryrefslogtreecommitdiff
path: root/aur
blob: 51dba031bac53441b0bb755777d69b51fe675b44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
set -euo pipefail

# Install paru on Arch-based systems, then clean cache.

if [[ "$(id -u)" -eq 0 ]]; then
	echo "Please run this script as a normal user, not root."
	exit 1
fi

if ! command -v pacman >/dev/null 2>&1; then
	echo "This script requires pacman. Are you on Arch or an Arch-based distro?"
	exit 1
fi

if command -v paru >/dev/null 2>&1; then
	echo "paru is already installed."
else
	echo "Installing required packages..."
	sudo pacman -S --needed --noconfirm base-devel git

	tmpdir="$(mktemp -d)"
	trap 'rm -rf "$tmpdir"' EXIT

	echo "Cloning paru into $tmpdir..."
	git clone https://aur.archlinux.org/paru.git "$tmpdir/paru"

	cd "$tmpdir/paru"

	echo "Building and installing paru..."
	makepkg -si --noconfirm
fi

echo "Cleaning paru cache..."
paru -Scc --noconfirm || true

echo "Done."

packages=(
	llama.cpp
	ledger-live
	orca-slicer
	tidal-hifi-bin
	dropbox
)

paru -S --needed "${packages[@]}"