This commit is contained in:
Santiago Lo Coco 2021-12-27 13:20:37 -03:00
parent 80b87931cd
commit 3854bf9309
1 changed files with 8 additions and 4 deletions

View File

@ -119,16 +119,20 @@ installPackage() {
exitIfCancel "You must have an active internet connection" "${3}"
}
getThePackages() {
if [ ! -f "packages.csv" ]; then
curl -LO "https://raw.githubusercontent.com/santilococo/CocoASAIS/master/packages.csv" > /dev/null 2>&1
fi
checkForParu() {
commOutput=$(runInChroot "command -v paru &> /dev/null || echo 1")
if [ "$commOutput" = "1" ] && [ "${1}" = "N" ]; then
runInChroot "sed -i 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers"
runInChroot "cd /tmp; sudo -u $username git clone https://aur.archlinux.org/paru-bin.git; cd paru-bin; sudo -u $username makepkg -si --noconfirm; cd ..; rm -rf paru-bin"
runInChroot "sed -i 's/%wheel ALL=(ALL) NOPASSWD: ALL/# %wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers"
fi
}
getThePackages() {
checkForParu
if [ ! -f "packages.csv" ]; then
curl -LO "https://raw.githubusercontent.com/santilococo/CocoASAIS/master/packages.csv" > /dev/null 2>&1
fi
local IFS=,
while read -r NAME IMPORTANT AUR; do
if [ "$IMPORTANT" = "${1}" ]; then