Merge pull request #4 from Oichkatzelesfrettschen/codex/find-issues-and-propose-fixes

Fix IFS restoration in gen_uEnv.txt.sh
This commit is contained in:
Eirikr Hinngart 2025-05-17 00:54:25 -07:00 committed by GitHub
commit 89b724a254
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

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