From f9efbfabb35592d045796cbe4187d6d72139847b Mon Sep 17 00:00:00 2001 From: Andrei Radchenko Date: Mon, 13 Jan 2025 18:11:47 +0100 Subject: [PATCH] working on script --- install-rpms.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/install-rpms.sh b/install-rpms.sh index a820e23..6ce5fa5 100755 --- a/install-rpms.sh +++ b/install-rpms.sh @@ -1,5 +1,5 @@ #!/bin/bash -#KOJI_TASK_ID=127827211 +KOJI_TASK_ID=127833569 KOJI_TASK_ID=${KOJI_TASK_ID:-} # Use the environment variable, or an empty string if not set # Check if KOJI_TASK_ID is set @@ -37,11 +37,10 @@ DEVEL_RPM=$(ls nodejs-devel-*.$ARCH.rpm 2>/dev/null | head -n 1) # Check if all necessary RPMs are found if [ -z "$MAIN_RPM" ] || [ -z "$DEVEL_RPM" ] || [ -z "$DEPENDENCY_RPM" ] || [ -z "$NPM_RPM" ]; then echo "Required RPMs not found for x86_64 architecture." >&2 - exit 1 + exit 0 fi # Install the main package, its dependency, and npm package -rpm -ivh "$MAIN_RPM" "$DEPENDENCY_RPM" "$NPM_RPM" "$DEVEL_RPM" || { - echo "Failed to install RPMs" >&2 - exit 1 -} +if ! dnf install -y --allowerasing "$MAIN_RPM" "$DEPENDENCY_RPM" "$NPM_RPM" "$DEVEL_RPM"; then + echo "Warning: Failed to install some RPMs using dnf" >&2 +fi