removed pacman -S sudo as it's present and added sdkmanager licenses confirmation
This commit is contained in:
2
dist/pacman.sh
vendored
2
dist/pacman.sh
vendored
@@ -33,7 +33,6 @@ else
|
|||||||
if [ "$EUID" -eq 0 ]; then
|
if [ "$EUID" -eq 0 ]; then
|
||||||
echo "Building paru as root is not allowed. Creating a temporary user for building..."
|
echo "Building paru as root is not allowed. Creating a temporary user for building..."
|
||||||
TEMP_USER="builder"
|
TEMP_USER="builder"
|
||||||
pacman -S --noconfirm sudo
|
|
||||||
useradd -m "$TEMP_USER"
|
useradd -m "$TEMP_USER"
|
||||||
# add user to sudoers with no password
|
# add user to sudoers with no password
|
||||||
echo "$TEMP_USER ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
echo "$TEMP_USER ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
@@ -72,6 +71,7 @@ else
|
|||||||
mapfile -t paru_packages < "$PARU_PACKAGE_FILE"
|
mapfile -t paru_packages < "$PARU_PACKAGE_FILE"
|
||||||
echo "Installing AUR packages using paru as user $BUILD_USER..."
|
echo "Installing AUR packages using paru as user $BUILD_USER..."
|
||||||
yes | su - "$BUILD_USER" -c "paru -S --noconfirm ${paru_packages[*]}"
|
yes | su - "$BUILD_USER" -c "paru -S --noconfirm ${paru_packages[*]}"
|
||||||
|
yes | su - "$BUILD_USER" -c "yes | sdkmanager --licenses"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "All packages installed successfully."
|
echo "All packages installed successfully."
|
||||||
|
|||||||
Reference in New Issue
Block a user