u-boot: fix uuu install firmware script
The function that parsed the output for a U-Boot variable value was receiving a multi-line output, with blank lines that were not being properly processed. Simplify the parsing by using 'sed' command. Signed-off-by: Hector Palacios <hector.palacios@digi.com> https://jira.digi.com/browse/DUB-951
This commit is contained in:
parent
5e2750082f
commit
f9eaa06e19
|
|
@ -19,15 +19,7 @@ clear
|
||||||
# Parse uuu cmd output
|
# Parse uuu cmd output
|
||||||
function getenv()
|
function getenv()
|
||||||
{
|
{
|
||||||
while read line; do
|
uuu -v fb: ucmd printenv "${1}" | sed -ne "s,^${1}=,,g;T;p"
|
||||||
if echo "${line}" | grep -i "$1"; then
|
|
||||||
# Get the U-boot variable content
|
|
||||||
echo "${line}" | sed -e 's,'${1}=',,g'
|
|
||||||
else
|
|
||||||
# Delete the line to return nothing
|
|
||||||
sed -e 'd'
|
|
||||||
fi
|
|
||||||
done < <(uuu -v fb: ucmd printenv ${1})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,7 @@ clear
|
||||||
# Parse uuu cmd output
|
# Parse uuu cmd output
|
||||||
function getenv()
|
function getenv()
|
||||||
{
|
{
|
||||||
while read line; do
|
uuu -v fb: ucmd printenv "${1}" | sed -ne "s,^${1}=,,g;T;p"
|
||||||
if echo "${line}" | grep -i "$1"; then
|
|
||||||
# Get the U-boot variable content
|
|
||||||
echo "${line}" | sed -e 's,'${1}=',,g'
|
|
||||||
else
|
|
||||||
# Delete the line to return nothing
|
|
||||||
sed -e 'd'
|
|
||||||
fi
|
|
||||||
done < <(uuu -v fb: ucmd printenv ${1})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue