-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpacker.sh
More file actions
34 lines (25 loc) · 1.01 KB
/
packer.sh
File metadata and controls
34 lines (25 loc) · 1.01 KB
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
#!/bin/bash
# define pacman packages
pacman_packages="base-devel"
# define packer packages
packer_packages="sickbeard-git"
# install required pre-reqs for makepkg
pacman -S --needed $pacman_packages --noconfirm
# create "makepkg-user" user for makepkg
useradd -m -g wheel -s /bin/bash makepkg-user
echo -e "makepkg-password\nmakepkg-password" | passwd makepkg-user
echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
echo "Defaults:makepkg-user !authenticate" >> /etc/sudoers
# download packer
curl -o /home/makepkg-user/packer.tar.gz https://aur.archlinux.org/packages/pa/packer/packer.tar.gz
cd /home/makepkg-user
tar -xvf packer.tar.gz
# install packer
su -c "cd /home/makepkg-user/packer && makepkg -s --noconfirm --needed" - makepkg-user
pacman -U /home/makepkg-user/packer/packer*.tar.xz --noconfirm
# install app from aur
su -c "packer -S $packer_packages --noconfirm" - makepkg-user
# remove base devel tools and packer
pacman -Ru packer base-devel git --noconfirm
# delete makepkg-user account
userdel -r makepkg-user