[jhalfs] 01/02: Only require wget if GETPKG is "y"
"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]> Fri, 24 Jan 2025 17:57:12 +0000
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <[email protected]> |
This is an automated email from the git hooks/post-receive script. git pushed a commit to branch trunk in repository jhalfs. commit 6fd5ad566886755f557924c35b5cfc32b5014072 Author: Pierre Labastie <[email protected]> AuthorDate: Fri Jan 24 14:19:59 2025 +0100 Only require wget if GETPKG is "y" Otherwise no download is done and wget is not used. Part of #1744 --- common/libs/func_check_version.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/common/libs/func_check_version.sh b/common/libs/func_check_version.sh index a4a8526..1a87fcc 100644 --- a/common/libs/func_check_version.sh +++ b/common/libs/func_check_version.sh @@ -190,16 +190,19 @@ inline_doc fi # Check for wget presence (using a dummy version) - WGET_LOC="$(whereis -b wget | cut -d" " -f2)" - if [ -x $WGET_LOC ]; then - wgetVer="$(wget --version | head -n1 | cut -d" " -f3)" - if echo "$wgetVer" | grep -q '^[[:digit:]]'; then - check_version "1.0.0" "${wgetVer}" "WGET" - else echo Wget detected, but no version found. Continuing anyway. + # Do this only if we need to download packages + if [ "$GETPKG" = y ]; then + WGET_LOC="$(whereis -b wget | cut -d" " -f2)" + if [ -x $WGET_LOC ]; then + wgetVer="$(wget --version | head -n1 | cut -d" " -f3)" + if echo "$wgetVer" | grep -q '^[[:digit:]]'; then + check_version "1.0.0" "${wgetVer}" "WGET" + else echo Wget detected, but no version found. Continuing anyway. + fi + else + echo "${nl_}\"${RED}wget${OFF}\" ${BOLD}must be installed on your system for jhalfs to run" + exit 1 fi - else - echo "${nl_}\"${RED}wget${OFF}\" ${BOLD}must be installed on your system for jhalfs to run" - exit 1 fi # Before checking libxml2 and libxslt version information, ensure tools -- To stop receiving notification emails like this one, please contact the administrator of this repository. -- http://lists.linuxfromscratch.org/sympa/info/alfs-discuss Unsubscribe: See the above information page