Skip to content

Commit

Permalink
Next attempt to determine mysql command name
Browse files Browse the repository at this point in the history
Newer versions of mysql docker image do not include the which command
  • Loading branch information
mstilkerich committed Jun 5, 2024
1 parent 24507c6 commit 76a92de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ RELEASE_VERSION ?= $(shell git tag --points-at HEAD)
# The following environment variables are assumed for MYSQL:
# - MYSQL_PASSWORD: Password of the MySQL root user
# - MYSQL_CMD_PREFIX: Prefix to use for all mysql commands (intended use: docker exec)
MYSQLCMD := $(shell $(MYSQL_CMD_PREFIX) sh -c 'which mariadb mysql | head -n 1')
MYSQLDUMPCMD := $(shell $(MYSQL_CMD_PREFIX) sh -c 'which mariadb-dump mysqldump | head -n 1')
MYSQLCMD := $(shell $(MYSQL_CMD_PREFIX) sh -c 'find /usr/bin -name mariadb -o -name mysql | head -n 1')
MYSQLDUMPCMD := $(shell $(MYSQL_CMD_PREFIX) sh -c 'find /usr/bin -name mariadb-dump -o -name mysqldump | head -n 1')
MYSQL := $(MYSQL_CMD_PREFIX) $(MYSQLCMD) -u root -p"$$MYSQL_PASSWORD"
MYSQLDUMP := $(MYSQL_CMD_PREFIX) $(MYSQLDUMP) -u root -p"$$MYSQL_PASSWORD"

Expand Down

0 comments on commit 76a92de

Please sign in to comment.