docker_tools/sbin/docker_mk_env

32 lines
608 B
Plaintext
Raw Normal View History

#!/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