qmining-data-editor/make.sh

18 lines
417 B
Bash
Executable file

#!/bin/bash
scriptPath=$(dirname -- "${0}")
domainPath="${scriptPath}/../../data/domain"
domain="${DOMAIN}"
if [ -z "${domain}" ] && [ -f "${domainPath}" ]; then
domain=$(cat "${domainPath}")
fi
if [ -z "${domain}" ]; then
echo -e "\033[0;41mDOMAIN is not set, and ${domainPath} does not exist!\033[0m"
exit 1
fi
NEXT_PUBLIC_DOMAIN="${domain}" npm run export
echo "Exported with domain: '${domain}'"