Ver Fonte

fixind and changing aur helper

Noah há 4 anos atrás
pai
commit
7005d627bf
1 ficheiros alterados com 18 adições e 6 exclusões
  1. 18 6
      testing/norisa.sh

+ 18 - 6
testing/norisa.sh

@@ -1,17 +1,29 @@
 #!/bin/sh
 
-pacman -Sy --noconfirm git vim
+pacman -Sy --noconfirm git vim ||  { printf "Error at script start:\n\nAre you sure you're running this as the root user?\n\t(Tip: run 'whoami' to check)\n\nAre you sure you have an internet connection?\n\t(Tip: run 'ip a' to check)\n"; exit; }
+
 
-# setting up build environment
-mkdir ~/.build && cd ~/.build
 
 # make new user
 sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/g' /etc/sudoers
 read -p "What is your desired username? " username
 useradd -m -g users -G wheel $username
 passwd $username
+cd /home/$username
 
-# install aur helper
-# git clone https://aur.archlinux.org/pacaur.git && cd pacaur && makepkg --allsource -si && cd
-
+# setting up build environment
+mkdir -p ~/.build && cd ~/.build
 
+# install aur helper (pacaur)
+cd /tmp || exit
+pacman -S --noconfirm expac jq
+rm -rf /tmp/pacaur*
+curl -sO https://aur.archlinux.org/cgit/aur.git/snapshot/yay.tar.gz &&
+sudo -u "$username" tar -xvf yay.tar.gz
+cd yay
+sudo -u "$username" makepkg --noconfirm -si
+cd /tmp || exit
+curl -sO https://aur.archlinux.org/cgit/aur.git/snapshot/pacaur.tar.gz &&
+sudo -u "$username" tar -xvf pacaur.tar.gz
+cd pacaur
+sudo -u "$username" makepkg --noconfirm -si