17.5.2025 Saturday 22:41

This commit is contained in:
Petr Nyc
2025-05-17 22:41:18 +02:00
parent ad8fffcec7
commit 405a4637ee
8 changed files with 74 additions and 10 deletions

View File

@@ -1,16 +1,35 @@
#!/usr/bin/env bash
source lib/logging.sh
[[ "$0" == /* ]] && typeset -r PRG=$0 || typeset -r PRG=$PWD/$0
TARGET=$1
BINDIR=$(dirname "$PRG")
typeset -r BINDIR
source "${BINDIR}/lib/logging.sh"
if [ -z "$TARGET" ];
W3M=/opt/homebrew/bin/w3m
AWK=/usr/bin/awk
CURL=/usr/bin/curl
source "${BINDIR}/lib/logging.sh"
TARGET="${1-11.4.81.0.1.195.1}"
log::info "TARGET:${TARGET}"
URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=4&target=${TARGET}"
log::debug $URL
output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1)
out=$(echo "$output" | $AWK '/^Details/ {found=1; next} found && NF')
if [[ -z "$out" ]];
then
log::fatal "No target specified on command line"
log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..."
exit 0
fi
log::info"Starting build for for Ul11u4SRU"
log::info "Starting build for for Ul11u4SRU"
log::info "Target: \"${TARGET}\""
JENKINS_TOKEN='1154eb0158729a7d326c1db13e7dca0cea'