diff --git a/jobss-kie-pkg-update/configure b/jobss-kie-pkg-update/configure new file mode 100755 index 00000000..32919fa4 --- /dev/null +++ b/jobss-kie-pkg-update/configure @@ -0,0 +1,14 @@ +#!/bin/bash +set -euo pipefail + +for candidate in yum dnf microdnf; do + if command -v "$candidate"; then + mgr="$(command -v "$candidate")" + "$mgr" update -y + "$mgr" -y clean all + exit + fi +done + +echo "cannot find a package manager" >&2 +exit 1 \ No newline at end of file diff --git a/jobss-kie-pkg-update/module.yaml b/jobss-kie-pkg-update/module.yaml new file mode 100644 index 00000000..53c1bb5f --- /dev/null +++ b/jobss-kie-pkg-update/module.yaml @@ -0,0 +1,7 @@ +schema_version: 1 +name: jboss.kie.pkg-update +version: "1.0" +description: "Perform a system update via the package manager." + +execute: +- script: configure \ No newline at end of file