Commit 2c1bd95f authored by Vitaly Lipatov's avatar Vitaly Lipatov

separate check input and output

parent 8e3cf250
...@@ -314,7 +314,7 @@ for opt in "$@" ; do ...@@ -314,7 +314,7 @@ for opt in "$@" ; do
done done
# if input is not console, get pkg from it too # if input is not console, get pkg from it too
if ! isatty ; then if ! inputisatty ; then
for opt in $(cat) ; do for opt in $(cat) ; do
check_filenames $opt check_filenames $opt
done done
......
...@@ -19,10 +19,15 @@ ...@@ -19,10 +19,15 @@
# copied from /etc/init.d/outformat (ALT Linux) # copied from /etc/init.d/outformat (ALT Linux)
inputisatty()
{
# check stdin
tty -s
}
isatty() isatty()
{ {
# check stdout # check stdout
# CHECKME: use tty -s?
test -t 1 test -t 1
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment