+ true script dir option for fetching related bash-scripts config on some quick commands

This commit is contained in:
toxa
2023-11-22 15:54:46 +03:00
parent fd7c8b9ac1
commit eb64cd702a
9 changed files with 15 additions and 12 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
. $DIR/bash/_docker-cmd.sh || {
. $SCRIPT_DIR/_docker-cmd.sh || {
echo "no docker cmd is presented" && exit 1
}

View File

@ -1,7 +1,7 @@
#!/bin/bash
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
. $DIR/bash/_docker-cmd.sh || {
. $SCRIPT_DIR/_docker-cmd.sh || {
echo "no docker cmd is presented" && exit 1
}

View File

@ -1,7 +1,7 @@
#!/bin/bash
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
. $DIR/bash/_docker-cmd.sh || {
. $SCRIPT_DIR/_docker-cmd.sh || {
echo "no docker cmd is presented" && exit 1
}

View File

@ -1,7 +1,7 @@
#!/bin/bash
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
. $DIR/bash/_docker-cmd.sh || {
. $SCRIPT_DIR/_docker-cmd.sh || {
echo "no docker cmd is presented" && exit 1
}

View File

@ -1,7 +1,7 @@
#!/bin/bash
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
. $DIR/bash/_docker-cmd.sh || {
. $SCRIPT_DIR/_docker-cmd.sh || {
echo "no docker cmd is presented" && exit 1
}

View File

@ -1,4 +1,5 @@
#!/bin/bash
# Not working on windows symlinks
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
GENERAL_LOG_FILE_PATH="${DIR}/log/mariadb/mariadb.log"

View File

@ -1,7 +1,7 @@
#!/bin/bash
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
SCRIPT_DIR="$(realpath $(dirname "$(readlink -f "$0")"))"
. $DIR/bash/_docker-cmd.sh || {
. $SCRIPT_DIR/_docker-cmd.sh || {
echo "no docker cmd is presented" && exit 1
}

View File

@ -1,4 +1,5 @@
#!/bin/bash
# Not working on windows symlinks
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
PHP_VERSION=$1 # Without dot

View File

@ -1,4 +1,5 @@
#!/bin/bash
# Not working on windows symlinks
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
PHP_VERSION=$1 # Without dot