fix oversite in install-rpm.sh

This commit is contained in:
Tomas Juhasz 2025-01-09 15:33:08 +01:00
commit e5abb5a988
2 changed files with 7 additions and 6 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

View file

@ -1,12 +1,12 @@
#!/bin/bash
KOJI_TASK_ID=2596437
#KOJI_TASK_ID=${KOJI_TASK_ID:-} # Use the environment variable, or an empty string if not set
#KOJI_TASK_ID=2596437
KOJI_TASK_ID=${KOJI_TASK_ID:-} # Use the environment variable, or an empty string if not set
# Check if KOJI_TASK_ID is set
[ -n "$KOJI_TASK_ID" ] || {
echo "env variable \$KOJI_TASK_ID not specified" >&2
echo "This variable should be present in TestingFarm" >&2
exit 1
exit 0
}
@ -27,9 +27,9 @@ koji download-build $KOJI_TASK_ID --arch=$ARCH || {
#if [ ! -z "$(sed 's/\s//g' rpms-list)" ];then sed 's/.rpm$//' rpms-list | xargs -n1 command printf '%q\n' | xargs -d'\n' rpm -q;else echo 'Nothing to verify, rpms-list is empty'; fi
# Ensure the required RPMs exist
MAIN_RPM=$(ls nodejs-*.x86_64.rpm 2>/dev/null | head -n 1)
DEPENDENCY_RPM=$(ls nodejs-libs-*.x86_64.rpm 2>/dev/null | head -n 1)
NPM_RPM=$(ls nodejs-npm-*.x86_64.rpm 2>/dev/null | head -n 1)
MAIN_RPM=$(ls nodejs-*.$ARCH.rpm 2>/dev/null | head -n 1)
DEPENDENCY_RPM=$(ls nodejs-libs-*.$ARCH.rpm 2>/dev/null | head -n 1)
NPM_RPM=$(ls nodejs-npm-*.$ARCH.rpm 2>/dev/null | head -n 1)
# Check if all necessary RPMs are found
if [ -z "$MAIN_RPM" ] || [ -z "$DEPENDENCY_RPM" ] || [ -z "$NPM_RPM" ]; then