Fix IFS handling in gen_uEnv.txt.sh

This commit is contained in:
Eirikr Hinngart 2025-05-17 00:54:11 -07:00
parent 4db99f4012
commit 3d8257d5eb

30
releasetools/gen_uEnv.txt.sh Executable file → Normal file
View File

@ -57,20 +57,22 @@ do
done
fill_cmd() {
#load == load method like fatload mmc 0:1
#prefix is an optional directory containing the ending /
load=$1
prefix=$2
export IFS=" "
echo $list | while true
do
if ! read -r mem addr
then
break
fi
#e.g. ; fatloat mmc 0:1 0x82000000 mydir/ds.elf
echo -n "; $load $mem $prefix$addr"
done
#load == load method like fatload mmc 0:1
#prefix is an optional directory containing the ending /
load=$1
prefix=$2
local old_IFS=$IFS
IFS=" "
echo $list | while true
do
if ! read -r mem addr
then
break
fi
#e.g. ; fatloat mmc 0:1 0x82000000 mydir/ds.elf
echo -n "; $load $mem $prefix$addr"
done
IFS=$old_IFS
}