docker_tools/sbin/docker_mk_env
Arnaud G. GIBERT d0b3985a23 - Initial release:
- Implement docker_start, docker_stop, docker_logs & docker_mk_env commands.
2024-10-05 12:21:38 +02:00

32 lines
608 B
Bash
Executable File

#!/bin/bash
#-------------------------------------------------------------------------------
set -o errexit
APPL_HOME_DIR="$(dirname "$(dirname "$0")")"
version="$1"
. ${APPL_HOME_DIR}/env
#-------------------------------------------------------------------------------
if [[ "${version}" != "" ]]
then
APPL_VERSION="$1"
fi
#-------------------------------------------------------------------------------
>${APPL_HOME_DIR}/.env
for var in $(grep "^ *[a-zA-Z0-9_-]*=" ${APPL_HOME_DIR}/env | sed -e "s/=.*//" -e "s/ *//" | sort -u)
do
echo "${var}='${!var}'" >>${APPL_HOME_DIR}/.env
done