Properly copy deploy scripts from pxeserver feed

Currently when download from a pxeserver feed, the remote directory
structure is also downloaded.
This fix will ensure scripts are download flat in
<feed>/upgrades/software-deploy directory.

Closes-Bug: 2116979

TCs:
    passed: observed scripts are properly copied to
            <feed>/upgrades/software-deploy directory after
            installed from pxeserver.

Signed-off-by: Bin Qian <bin.qian@windriver.com>
Change-Id: I5c6beff1a670ead5a545d7c94417ce240d5d831f
This commit is contained in:
Bin Qian
2025-07-15 20:23:28 +00:00
parent 43498078a9
commit 9bbb60f063

View File

@@ -3185,8 +3185,10 @@ else
if [ $? -eq 0 ]; then
ilog "Downloading USM upgrades directory from ${upgrade_url}"
cd ${feed}/upgrades
wget ${NOVERIFYSSL_WGET_OPT} -r -np -nH --cut-dirs=3 -R "index.html*" \
to_cut=$(echo "${upgrade_url#*://}" | cut -d/ -f2- | awk -F/ '{print NF}')
wget ${NOVERIFYSSL_WGET_OPT} -r -np -nH --cut-dirs=${to_cut} -R "index.html*" \
${upgrade_url}/ -o /${LAT_DIR}/wget_usm_upgrades.log
ilog "USM upgrades directory download complete"
chmod 755 ./software-deploy/*
ilog "The file permissions in the ${feed}/upgrades/software-deploy/ directory are configured to 755."