From d3ad5356536b7243611099dc76669d3fdfb61e43 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Mon, 28 Feb 2022 20:09:26 -0300 Subject: [PATCH] Add setPermissions() --- pkgbuild.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgbuild.sh b/pkgbuild.sh index b88156a..b665a24 100755 --- a/pkgbuild.sh +++ b/pkgbuild.sh @@ -1,13 +1,17 @@ #!/usr/bin/env bash +setPermissions() { + echo "nobody ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + visudo -c + chmod -R a+rw . +} + runScript() { set -euo pipefail pacman -Syu --noconfirm base-devel - echo "nobody ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - visudo -c - chmod -R a+rw . + setPermissions baseDir="$PWD" [ -n "$INPUT_PKGDIR" ] && inBaseDir=true || inBaseDir=false