odoov18-compta/1.gitclone.sh

70 lines
2.2 KiB
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
# Downlaod des repo OCA
#
mkdir -p ./custom
cd custom
for repo in \
https://github.com/OCA/server-brand.git \
https://github.com/oca/web.git \
https://github.com/OCA/l10n-france.git \
https://github.com/OCA/edi.git
https://github.com/OCA/account-analytic.git
https://github.com/OCA/account-financial-reporting.git
https://github.com/OCA/account-financial-tools.git
https://github.com/OCA/account-invoicing.git
https://github.com/OCA/account-payment.git
https://github.com/OCA/account-reconcile.git
https://github.com/OCA/bank-payment.git
https://github.com/OCA/bank-statement-import.git
https://github.com/OCA/community-data-files.git
https://github.com/OCA/currency.git
https://github.com/OCA/knowledge.git
https://github.com/OCA/mail.git
https://github.com/OCA/mis-builder.git
https://github.com/OCA/partner-contact.git
https://github.com/OCA/queue.git
https://github.com/OCA/reporting-engine.git
https://github.com/OCA/sale-reporting.git
https://github.com/OCA/sale-workflow.git
https://github.com/OCA/server-auth.git
https://github.com/OCA/account-financial-reporting.git
https://github.com/OCA/server-tools.git
https://github.com/OCA/server-ux.git
https://github.com/OCA/social.git
do
git clone -b 18.0 "$repo"
done
cd ..
# Clone de la deniere version v18 de Dockerfile pour Odoo
# recupérer le commit sur l'url
# par exemple :
# URL : https://github.com/odoo/docker/tree/b8b9102bf64e67d7baeaa410ff506dbe16fa8dfe/18.0
# Commit ! b8b9102bf64e67d7baeaa410ff506dbe16fa8dfe
#
COMMIT="b8b9102bf64e67d7baeaa410ff506dbe16fa8dfe"
BASE="https://raw.githubusercontent.com/odoo/docker/${COMMIT}/18.0"
DEST="./config-odoo/"
FILES=(Dockerfile entrypoint.sh odoo.conf wait-for-psql.py)
mkdir -p "${DEST}"
for f in "${FILES[@]}"; do
curl -fsSL "${BASE}/${f}" -o "${DEST}/${f}"
done
chmod +x "${DEST}/entrypoint.sh" "${DEST}/wait-for-psql.py"
sed -i 's/curl \\/curl vim \\/' "${DEST}/Dockerfile"
sed -i 's|^COPY \./entrypoint\.sh /$|COPY ./requirements.txt /tmp/requirements.txt\nRUN pip install --no-cache-dir --break-system-packages -r /tmp/requirements.txt\nCOPY ./entrypoint.sh /|' "${DEST}/Dockerfile"
echo "OK. ${#FILES[@]} fichiers dans ${DEST}"