myvesta-php-func support for stdin

This commit is contained in:
myvesta 2023-04-14 15:39:33 +02:00 committed by GitHub
commit 4dd6d22f07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 126 additions and 6 deletions

View file

@ -8,5 +8,14 @@
# Action #
#----------------------------------------------------------#
if [ -p /dev/stdin ]; then
STDIN=$(cat -)
if [ ! -z "$STDIN" ]; then
echo "$STDIN" | php /usr/local/vesta/func/bash-to-php-interpreter.php "$@"
exit $?
fi
fi
php /usr/local/vesta/func/bash-to-php-interpreter.php "$@"
exit $?