From 3c26fa40cae01513cadc3cfdcb8b927c9d74a15a Mon Sep 17 00:00:00 2001 From: "Ignacio J. Ortega" Date: Tue, 31 Aug 2021 16:50:24 +0200 Subject: [PATCH] [UPD] added some more direct scripts [FIX] down command tries all services and up in downup fails --- bin/createdb | 4 ++++ bin/dev_command/down | 2 +- bin/dropdb | 4 ++++ bin/myroot | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 bin/createdb create mode 100755 bin/dropdb create mode 100755 bin/myroot diff --git a/bin/createdb b/bin/createdb new file mode 100755 index 0000000..9653b68 --- /dev/null +++ b/bin/createdb @@ -0,0 +1,4 @@ +#!/bin/bash +echo "CREATE DATABASE $1 CHARACTER SET ${2:-"utf8"} COLLATE ${3:-"utf8_general_ci"};" \ + | `dirname $0`/dev myroot +#exit $? diff --git a/bin/dev_command/down b/bin/dev_command/down index 94e4fd4..d92ecd7 100644 --- a/bin/dev_command/down +++ b/bin/dev_command/down @@ -1,5 +1,5 @@ -dc yml_all; +#dc yml_all; dc mode 'down -v'; dc run "$@"; diff --git a/bin/dropdb b/bin/dropdb new file mode 100755 index 0000000..dfa708d --- /dev/null +++ b/bin/dropdb @@ -0,0 +1,4 @@ +#!/bin/bash +echo "DROP DATABASE $1;" \ + | `dirname $0`/dev myroot +#exit $? diff --git a/bin/myroot b/bin/myroot new file mode 100755 index 0000000..44cb6a5 --- /dev/null +++ b/bin/myroot @@ -0,0 +1,3 @@ +#!/bin/bash +`dirname $0`/dev `basename $0` "$@" +exit $?