From c366cd83bb86440dcc15a2203df57be75ff3f11f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 4 Oct 2013 16:51:54 -0400 Subject: libremakepkg: close stdin on most commands being sent through `indent` Besides preventing interactive use, this prevents the program from knowing the size of the terminal. --- src/chroot-tools/libremakepkg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index fc6418c..963747f 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -117,10 +117,10 @@ build() ( fi prepare_chroot "$copydir" "$LIBREHOME" "$repack" false - "${run[@]}" /chrootprepare "$@" |& indent + "${run[@]}" /chrootprepare "$@" 0>&- |& indent run_hook pre_build "$copydir" trap "run_hook post_build '$copydir'" EXIT - "${run[@]}" /chrootbuild "$@" |& indent + "${run[@]}" /chrootbuild "$@" 0>&- |& indent ) # The main program ############################################################# @@ -244,7 +244,7 @@ main() { "Waiting for existing lock on chroot copy to be released: [%s]" "$copy" # Create the chroot if it does not exist msg 'Initializing the chroot...' - librechroot "${librechroot_flags[@]}" make |& indent + librechroot "${librechroot_flags[@]}" make 0>&- |& indent fi # Set target CARCH @@ -255,7 +255,7 @@ main() { msg 'Starting pre-build activities...' run_hook check_pkgbuild msg 'Downloading sources...' - download_sources "$copydir" "$LIBREUSER" |& indent + download_sources "$copydir" "$LIBREUSER" 0>&- |& indent # Build msg 'Starting to build the package...' @@ -265,7 +265,7 @@ main() { # Post-build msg 'Starting post-build activities...' run_hook check_pkg - add_to_local_repo "$copydir" "$copydir"/pkgdest/*.pkg.tar* |& indent + add_to_local_repo "$copydir" "$copydir"/pkgdest/*.pkg.tar* 0>&- |& indent } main "$@" -- cgit v1.2.2