working on script

This commit is contained in:
Andrei Radchenko 2025-01-13 18:11:47 +01:00
commit f9efbfabb3

View file

@ -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