Skip to content
Permalink
Browse files

include expect/unbuffer in INSTALL install list

  • Loading branch information
jef-n committed Jun 9, 2017
1 parent c21846a commit 43fac747384fc8184227da3da918784a8aebd027
Showing with 1 addition and 0 deletions.
  1. +1 −0 scripts/scandeps.pl
@@ -86,6 +86,7 @@

push @dep, $dep;
push @dep, "cmake-curses-gui";
push @dep, "expect"; # for unbuffer

This comment has been minimized.

Copy link
@3nids

3nids Jun 10, 2017

Member

I think it is exclusively used in spell_check.
If so, have you include silver-searcher too?


print O "| $dist | ``apt-get install" . join( " ", @dep ) . "`` |\n";
}

3 comments on commit 43fac74

@nyalldawson

This comment has been minimized.

Copy link
Collaborator

@nyalldawson nyalldawson replied Jun 9, 2017

@jef-n on a semi-related note, do you know if there's any unbuffer binaries available for Windows? My searching proved fruitless...

@jef-n

This comment has been minimized.

Copy link
Member Author

@jef-n jef-n replied Jun 10, 2017

@nyalldawson I use cygwin's expect and this:

#!/bin/sh
# -*- tcl -*-
# The next line is executed by /bin/sh, but not tcl \
exec tclsh "$0" ${1+"$@"}

package require Expect


# -*- tcl -*-
# Description: unbuffer stdout of a program
# Author: Don Libes, NIST

if {[string compare [lindex $argv 0] "-p"] == 0} {
    # pipeline
    set stty_init "-echo"
    eval [list spawn -noecho] [lrange $argv 1 end]
    close_on_eof -i $user_spawn_id 0
    interact {
	eof {
	    # flush remaining output from child
	    expect -timeout 1 -re .+
	    return
	}
    }
} else {
    set stty_init "-opost"
    set timeout -1
    eval [list spawn -noecho] $argv
    expect
    exit [lindex [wait] 3]
}
@nyalldawson

This comment has been minimized.

Copy link
Collaborator

@nyalldawson nyalldawson replied Jun 10, 2017

@jef-n perfect, thanks!

Please sign in to comment.
You can’t perform that action at this time.