Answer the question
In order to leave comments, you need to log in
How to use ifeq to test the output of a command?
Working with Makefile, I have the command:
docker-compose exec php-bundle /bin/bash -c "getent passwd docker"
docker:x:1000:1000::/home/docker:/bin/sh
ifeq (ПОЛЬЗОВАТЕЛЬ В КОНТЕЙНЕРЕ СУЩЕСТВУЕТ)
//
endif
ifeq ($(docker-compose exec php-bundle /bin/bash -c "getent passwd docker"), )
echo 1
endif
Answer the question
In order to leave comments, you need to log in
Look, it went something like this:
ifeq ($(shell docker-compose exec php-bundle /bin/bash -c "getent passwd docker"),)
//
else
echo User "docker" already exists
endif
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question