samgis-lisa-on-zero / scripts /baremetal_entrypoint.sh
alessandro trinca tornidor
[ci] add the option to install the project in a 'bare metal' installation, see README.md for instructions
0c9e62a
raw
history blame
773 Bytes
#!/usr/bin/env bash
if [ -z "${WORKDIR}" ];
then
WORKDIR=$1
fi
if [ -z "${XDG_CACHE_HOME}" ];
then
XDG_CACHE_HOME=$HOME/.cache
fi
echo "WORKDIR: ${WORKDIR} ..."
echo "XDG_CACHE_HOME: ${XDG_CACHE_HOME} ..."
cd ${WORKDIR}
if [ ! -f "${WORKDIR}/.env_source" ];
then
echo "missing ${WORKDIR}/.env_source file, exit now..."
exit 1
fi
source ${WORKDIR}/.env_source
echo "FOLDERS_MAP: ${FOLDERS_MAP} ..."
which python
python --version
python ${WORKDIR}/scripts/create_folders_and_variables_if_not_exists.py
cd ${WORKDIR}/static
npm install -g npm pnpm
pnpm install
pnpm tailwindcss -i ${WORKDIR}/static/src/input.css -o ${WORKDIR}/static/dist/output.css
cd ${WORKDIR}
chmod +x ${WORKDIR}/scripts/entrypoint.sh
bash ${WORKDIR}/scripts/entrypoint.sh
exit 0