From 1adb3e109ab6781be82aaf77abfa0b6ae31a7914 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Tue, 1 Mar 2022 13:16:54 -0300 Subject: [PATCH] Refactor --- pkgbuild.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgbuild.sh b/pkgbuild.sh index b834c0e..02972a3 100755 --- a/pkgbuild.sh +++ b/pkgbuild.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -setPermissions() { +addUser() { useradd calbuilder -m echo "calbuilder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers visudo -c @@ -102,10 +102,10 @@ getInputs() { runScript() { set -euo pipefail - pacman -Syu --noconfirm base-devel + pacman -Syu --needed --noconfirm base-devel getInputs - setPermissions + addUser baseDir="$PWD" if [ -n "$pkgDir" ] && [ "$pkgDir" != "." ]; then