diff options
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -13,12 +13,12 @@ fi printf "%s: Stowing packages\n" "$0" # shellcheck disable=SC2086 stow -R "$@" ${1:-*}/ 2>&1 | awk ' - /^UNLINK:/ { stdout[$0] = 1; next } - /\(reverts previous action\)$/ { delete stdout["UNLINK: " $2]; next } - /^LINK:/ { stdout[$0] = 1; next } + /^UNLINK:/ { stdout[NR] = $0; unlinked[$2] = NR; next } + /\(reverts previous action\)$/ { delete stdout[unlinked[$2]]; next } + /^LINK:/ { stdout[NR] = $0; next } { stderr[NR] = $0 } END { - for (out in stdout) { print out }; + for (out in stdout) { print stdout[out] }; for (err in stderr) { print stderr[err] > "/dev/stderr" } if ( length(stderr) > 0 ) { exit 1 } } |