From 9ab3a2c1745a3271820d32842d991ea44bbb9c18 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 04 Jan 2021 16:40:55 -0500 Subject: cmd/build: Fix redirection syntax error Fixes: src/cmd/build.sh: 199: src/cmd/build.sh: Syntax error: word unexpected (expecting "}") --- diff --git a/src/cmd/build.sh b/src/cmd/build.sh index 733817e..f7d6716 100644 --- a/src/cmd/build.sh +++ b/src/cmd/build.sh @@ -113,7 +113,6 @@ cmd_build_main() local source= local version= local log= - local tmp_fd= local es= if [ ${#} -lt 2 ]; then @@ -186,8 +185,6 @@ cmd_build_main() log="${_cmd_build_pkg_dir}/../$(: \ )${source}_${version}_${host_arch}_${host_plat}.log" - fdalloc - tmp_fd=${FD} es=0 { { @@ -195,9 +192,9 @@ cmd_build_main() set +e _cmd_build_build "${host_arch}" "${host_plat}" \ "${@}" 2>&1 - printf '%d' ${?} 1>&${tmp_fd} + printf '%d' ${?} 1>&3 } | tee "${log}" 1>&2 - } ${tmp_fd}>&1 | { + } 3>&1 | { read es exit ${es} } diff --git a/src/fd.sh b/src/fd.sh index b929dfa..387e17c 100644 --- a/src/fd.sh +++ b/src/fd.sh @@ -18,7 +18,8 @@ # along with the ProteanOS Development Kit. If not, see # . -_FD_MIN=3 +# FD 3 is available as a temporary FD. +_FD_MIN=4 # Shells and the file descriptors they reserve for the user: # * Debian Almquist Shell # - The shell doesn't understand any file descriptor greater than 9. -- cgit v0.9.1