I'm new with Makefile. I need to automate create user for postgres terminal.
I tried this example and it did not work for me:
createuser:
@echo "$(OK_COLOR)==> create user$(NO_COLOR)"
@psql mydbdevelopmentname
@create user myusername;
@/q
@echo "$(OK_COLOR)==> Done$(NO_COLOR)"
Neither @create user myusername; nor @/q works.
When I ran make createuser and exit manually with \q from postgres terminal, I receive this error:
/bin/sh: create: command not found
make: *** [createuser] Error 127