summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2021-01-04 16:40:55 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2021-01-04 18:48:27 (EST)
commit9ab3a2c1745a3271820d32842d991ea44bbb9c18 (patch)
tree5d3f81f17a768e103f54c9ae3ad01b19099dff56 /src
parente46bb3d90eec381d33f3280e6caad8a87b0eeddc (diff)
cmd/build: Fix redirection syntax error
Fixes: src/cmd/build.sh: 199: src/cmd/build.sh: Syntax error: word unexpected (expecting "}")
Diffstat (limited to 'src')
-rw-r--r--src/cmd/build.sh7
-rw-r--r--src/fd.sh3
2 files changed, 4 insertions, 6 deletions
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
# <http://www.gnu.org/licenses/>.
-_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.