diff options
author | Dave Reisner <d@falconindy.com> | 2012-01-11 20:12:44 -0500 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2012-01-12 12:08:13 +0100 |
commit | 762c21b995db16fba04bba27414d88ec324f70bb (patch) | |
tree | 7208838b7b5f604502ae2bf78f8bf2496eaaaea3 | |
parent | fec4ec740946e831e35accedfbd7857af2de6c61 (diff) |
functions: avoid usage of tac
tac stupidly writes to a tempfile when the input isn't seekable, which
is true in our case as it's reading from a pipe. Since the whole goal
here is to avoid using disk, build an array in reverse. For whatever
reason, Bash truly sucks at doing this from a execution time standpoint,
but that isn't really a concern here.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r-- | functions | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -497,8 +497,8 @@ umount_all() { continue fi - mounts+=("$target") - done < <(findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | tac) + mounts=("$target" "${mounts[@]}") + done < <(findmnt -mrunRo TARGET,FSTYPE,OPTIONS /) umount -r "${mounts[@]}" |