-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathquickinstall.sh
More file actions
executable file
·41 lines (33 loc) · 871 Bytes
/
quickinstall.sh
File metadata and controls
executable file
·41 lines (33 loc) · 871 Bytes
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
#!/bin/sh
if [ "$UID" -ne 0 ]; then
echo ">> You need to run this script as root."
exit 1;
fi
REPO=$(grep paktahn /etc/pacman.conf)
if [ ! -z "$REPO" ]; then
echo ">> The Paktahn repository is already configured in pacman.conf."
else
unset CARCH
source /etc/makepkg.conf
REPO=
if [ "$CARCH" = "i686" ]; then
echo "Detected 32-bit arch."
REPO="http://viridian-project.de/~sky/paktahn/repo"
fi
if [ "$CARCH" = "x86_64" ]; then
echo "Detected 64-bit arch."
REPO="http://viridian-project.de/~sky/paktahn/repo/x86_64"
fi
if [ -z $REPO ]; then
echo "Uh oh, don't know where to find the Paktahn repo for arch $CARCH. Exiting."
exit 1
fi
echo -n ">> Adding Paktahn repository to pacman.conf... "
cat >> /etc/pacman.conf <<EOF
[paktahn]
Server = $REPO
EOF
echo done.
fi
echo ">> Syncing Paktahn..."
pacman -Sy paktahn