From 147fba81486a0a2e693f7cb15ca07bf049223ca8 Mon Sep 17 00:00:00 2001 From: alfeilex <101652401+alfeilex@users.noreply.github.com> Date: Thu, 14 Nov 2024 09:44:34 +0100 Subject: [PATCH] Fix: Global arguments of find command should be set first (#1393) --- scripts/src/main/resources/scripts/functions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/src/main/resources/scripts/functions b/scripts/src/main/resources/scripts/functions index e89e2ef69..97e2a7c69 100755 --- a/scripts/src/main/resources/scripts/functions +++ b/scripts/src/main/resources/scripts/functions @@ -1904,11 +1904,11 @@ function doGetAnyLatestSoftwareVersion() { edition=$(doGetSoftwareEdition "${software}") if [ -z "${prefix}" ] then - version="$(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -type d -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | sort -rV | head -1)" + version="$(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -mindepth 1 -maxdepth 1 -type d -print | awk -F'/' '{print $NF}' | sort -rV | head -1)" else prefix="${prefix:0:${#prefix}-2}" # 2 for "*!" prefix="${prefix/./[.]}" - version="$(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -type d -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | grep "^${prefix}" | sort -rV | head -1)" + version="$(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -mindepth 1 -maxdepth 1 -type d -print | awk -F'/' '{print $NF}' | grep "^${prefix}" | sort -rV | head -1)" fi echo "${version}" } @@ -1926,14 +1926,14 @@ function doGetLatestSoftwareVersion() { versions=() while IFS= read -r line; do versions+=("${line}") - done < <(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -type d -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | sort -rV) + done < <(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -mindepth 1 -maxdepth 1 -type d -print | awk -F'/' '{print $NF}' | sort -rV) else prefix="${prefix:0:${#prefix}-1}" # 1 for "*" prefix="${prefix/./[.]}" versions=() while IFS= read -r line; do versions+=("${line}") - done < <(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -type d -mindepth 1 -maxdepth 1 -print | awk -F'/' '{print $NF}' | grep "^${prefix}" | sort -rV) + done < <(find "${DEVON_IDE_HOME}"/urls/"${software}"/"${edition}" -mindepth 1 -maxdepth 1 -type d -print | awk -F'/' '{print $NF}' | grep "^${prefix}" | sort -rV) fi # version is not considered stable (see IDEasy VersionSegment) if: