From e2f56ac1b4da94ddd4cabac0fddfd760579395c1 Mon Sep 17 00:00:00 2001 From: anorien90 Date: Tue, 9 Dec 2025 14:52:40 +0100 Subject: [PATCH] fixed build user pwd issue --- dist/pacman.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/pacman.sh b/dist/pacman.sh index 97deafc..6093973 100755 --- a/dist/pacman.sh +++ b/dist/pacman.sh @@ -32,13 +32,13 @@ else # Check if $USER is root and if so add a temporary non-root user for building paru if [ "$EUID" -eq 0 ]; then echo "Building paru as root is not allowed. Creating a temporary user for building..." - TEMP_USER="tempuser" + TEMP_USER="builder" useradd -m "$TEMP_USER" + echo "Adding temporary user pwd" + yes | passwd -d "$TEMP_USER" chown -R "$TEMP_USER":"$TEMP_USER" . - login $TEMP_USER echo "Building paru as user $TEMP_USER..." - makepkg -si --noconfirm - logout + yes | su - "$TEMP_USER" -c "cd $(pwd) && makepkg -si --noconfirm" userdel -r "$TEMP_USER" else echo "Building paru as user $USER..."