mfg
This commit is contained in:
25
.ddev/.global_commands/host/heidisql
Executable file
25
.ddev/.global_commands/host/heidisql
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
## #ddev-generated: If you want to edit and own this file, remove this line.
|
||||
## Description: Run HeidiSQL against current db
|
||||
## Usage: heidisql
|
||||
## Example: "ddev heidisql"
|
||||
## OSTypes: windows,wsl2
|
||||
## HostBinaryExists: /mnt/c/Program Files/HeidiSQL/heidisql.exe,C:\Program Files\HeidiSQL\Heidisql.exe
|
||||
|
||||
arguments="--host=\"127.0.0.1\" --port=${DDEV_HOST_DB_PORT} --user=root --password=root --description=${DDEV_SITENAME}"
|
||||
|
||||
if [ "${DDEV_PROJECT_STATUS}" != "running" ]; then
|
||||
echo "Project ${DDEV_PROJECT} is not running, starting it"
|
||||
ddev start
|
||||
fi
|
||||
case $OSTYPE in
|
||||
"win*"* | "msys"*)
|
||||
'/c/Program Files/HeidiSQL/heidisql.exe' $arguments &
|
||||
;;
|
||||
# linux-gnu in this case is only WSL2 as selected in OSTypes above
|
||||
"linux-gnu")
|
||||
# HeidiSQL is Microsoft only, but we want to start it from WSL2
|
||||
"/mnt/c/Program Files/HeidiSQL/heidisql.exe" $arguments &
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user