Fix: Passt die is_interactive-Prüfung an.
This commit is contained in:
parent
94b359fded
commit
3b11d0e75a
@ -1,8 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
is_interactive() {
|
is_interactive() {
|
||||||
case $- in
|
# Prüft, ob ein Terminal verfügbar ist
|
||||||
*i*) return 1 ;; # Interaktive Shell
|
if [ -t 0 ] || [ -t 1 ] || [ -t 2 ]; then
|
||||||
*) return 0 ;; # Nicht-interaktive Shell
|
return 0
|
||||||
esac
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user