diff options
author | Riku Viitanen <riku.viitanen@protonmail.com> | 2023-09-03 17:00:18 +0300 |
---|---|---|
committer | Riku Viitanen <riku.viitanen@protonmail.com> | 2023-09-03 17:00:21 +0300 |
commit | ef3fb05d66f1b5c94dd65ae2d14b691227d6afbe (patch) | |
tree | 894ae0f3d31e032a34fc9a6d65f6c31036ae8dcb /script/handle | |
parent | e369e8fb4ab688f26334e93067fdd307d5793710 (diff) |
Less cat abuse
More than 90% of cats were thus terminated.
read (shell built-in) is better at reading, and dogs are better pets.
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
Diffstat (limited to 'script/handle')
-rwxr-xr-x | script/handle/make/config | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/script/handle/make/config b/script/handle/make/config index c148ebca..3db91550 100755 --- a/script/handle/make/config +++ b/script/handle/make/config @@ -26,8 +26,8 @@ set -u -e . "include/err.sh" -projectname="$(cat projectname)" -our_version="$(cat version)" +read projectname < projectname +read our_version < version export LOCALVERSION="-${projectname}-${our_version}" @@ -270,11 +270,11 @@ copy_elf() err "copy_elf: cannot prepare coreboot image" fi - for f in $(cat "${listfile}"); do + while read f; do [ ! -f "${codedir}/$f" ] || \ cp "${codedir}/${f}" "${dest_dir}/" || \ fail "copy_elf: cannot copy elf file" - done + done < ${listfile} ./handle make file -c "${codedir}" || \ fail "copy_elf: clean: ${codedir} (${project}/${target})" |