Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "nobody darch=NOPASSWD: /usr/bin/pacman" >> /etc/sudoers
- install_packages() {
- pacman -S --noconfirm "$@"
- }
- clear_package_cache() {
- pacman -Scc --noconfirm
- }
- install_aur_package() {
- trizen -S --noconfirm --noedit $1
- }
- create_build_dir() {
- chsh -s /bin/bash nobody
- mkdir /home/build
- chgrp nobody /home/build
- chmod g+ws /home/build
- setfacl -m u::rwx,g::rwx /home/build
- setfacl -d --set u::rwx,g::rwx,o::- /home/build
- }
- install_aur_helper() {
- echo "Set disable_coredump false" >> /etc/sudo.conf
- pacman -S --noconfirm git
- create_build_dir
- #install trizen
- su - nobody -c "git clone https://aur.archlinux.org/trizen.git /home/build/trizen"
- cd /home/build/trizen
- su - nobody -c "makepkg -si --noconfirm"
- cd ..
- rm -r /home/build/trizen
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement