github.com/ddev/ddev@v1.23.2-0.20240519125000-d824ffe36ff3/pkg/ddevapp/global_dotddev_assets/commands/host/sequelace (about)

     1  #!/bin/bash
     2  
     3  #ddev-generated
     4  ## Description: Run sequelace with current project database
     5  ## Usage: sequelace
     6  ## Example: "ddev sequelace" or "ddev sequelace database2" to open a database named "database2".
     7  ## OSTypes: darwin
     8  ## HostBinaryExists: /Applications/Sequel ace.app
     9  ## DBTypes: mysql,mariadb
    10  
    11  DATABASE="${1:-db}"
    12  
    13  if [ "${DDEV_PROJECT_STATUS}" != "running" ] && [ -z "$no_recursion" ]; then
    14    echo "Project ${DDEV_PROJECT} is not running, starting it"
    15    ddev start
    16    start_exit_code=$?
    17    if [ $start_exit_code -ne 0 ]; then
    18      exit $start_exit_code
    19    fi
    20    # run this script again, as the environment is updated after "ddev start"
    21    no_recursion=true ddev "$(basename "$0")" "$@"
    22    exit $?
    23  fi
    24  query="mysql://root:root@${DDEV_PROJECT}.${DDEV_TLD}:${DDEV_HOST_DB_PORT}/${DATABASE}"
    25  
    26  set -x
    27  open "$query" -a "/Applications/Sequel Ace.app/Contents/MacOS/Sequel Ace"