Accept stdin in pacman
and yay
commands
This commit is contained in:
parent
975a0af096
commit
d6b37dbf58
1 changed files with 8 additions and 2 deletions
|
@ -4,7 +4,10 @@ begin
|
|||
source "$dir/../../Common/Scripts/software.fish"
|
||||
|
||||
function runYay -d "Run yay with pre-configured defaults"
|
||||
yay --needed --answerclean=None --answerdiff=None -Syu $argv
|
||||
if not isatty 0
|
||||
echo "stdin detected" 1>&2
|
||||
cat
|
||||
end | yay --needed --answerclean=None --answerdiff=None -Syu $argv
|
||||
end
|
||||
|
||||
function yayinst -d "Install yay-package non-interactively"
|
||||
|
@ -12,7 +15,10 @@ begin
|
|||
end
|
||||
|
||||
function runPacman -d "Run pacman with pre-configured defaults"
|
||||
sudo pacman --needed -Syu $argv
|
||||
if not isatty 0
|
||||
echo "stdin detected" 1>&2
|
||||
cat
|
||||
end | sudo pacman --needed -Syu $argv
|
||||
end
|
||||
|
||||
function pacinst -d "Install pacman-package non-interactively"
|
||||
|
|
Loading…
Reference in a new issue