mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
do not handle errors on mktemp in shell scripts
errors are not defined for mktemp, and the /tmp file system should be assumed reliable. if /tmp is *unreliable*, then this is not something that lbmk either can or should fix; the user clearly has bigger problems. manpages for mktemp do not define errors. it is assumed to be completely reliable. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+2
-3
@@ -24,10 +24,9 @@ scan_config()
|
||||
awkstr=" /\{.*${1}.*}{/ {flag=1;next} /\}/{flag=0} flag { print }"
|
||||
confdir="${2}"
|
||||
_fail="${3}"
|
||||
revfile="$(mktemp -t sources.XXXXXXXXXX)" || \
|
||||
"${_fail}" "scan_config: Cannot initialise tmpfile"
|
||||
revfile="$(mktemp -t sources.XXXXXXXXXX)"
|
||||
cat "${confdir}/"* > "${revfile}" || \
|
||||
"${_fail}" "scan_config: Cannot concatenate files"
|
||||
"${_fail}" "scan_config ${confdir}: Cannot concatenate files"
|
||||
while read -r line ; do
|
||||
set ${line} 1>/dev/null 2>/dev/null || :
|
||||
if [ "${1%:}" = "depend" ]; then
|
||||
|
||||
Reference in New Issue
Block a user