From d13c77a09097bc791c74749d97b3e27027c17459 Mon Sep 17 00:00:00 2001 From: "Jorge E. Gomez" Date: Wed, 7 Apr 2021 18:54:15 -0500 Subject: [PATCH] Documents usage of install script --- README.md | 28 +++------------------------- install_all.sh | 39 +++++++++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index b95df20..d4bdeff 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ To be installed into this directory structure: ## Repositories -### Odoo 14.0 +### Odoo 14.0 core **Location:** `/odoo` @@ -29,12 +29,6 @@ To clone from source: git clone --single-branch --depth 1 --branch 14.0 https://github.com/odoo/odoo.git ``` -To install into the production structure: - -```sh -sudo rsync -av --exclude .git --chown odoo:odoo ./odoo/ /opt/odoo/core -``` - ### Avancys v14 for Agofer **Location:** `/v14_avancys_agofer` @@ -45,13 +39,6 @@ To clone from source: git clone git@gitlab.com:mgarcia.avancys/v14_avancys_agofer.git ``` -To install into the production structure: - -```sh -sudo rsync -av --exclude .git --exclude-from=rejected_proprietary_modules.txt \ - --chown=odoo:odoo ./v14_avancys_agofer/ /opt/odoo/vendor/ -``` - ### Custom in-house modules **Location:** `/Extended` @@ -62,12 +49,6 @@ To clone from source: git clone ssh://git@gitea.agofer.net:22001/Agofer/Extended.git ``` -To install into the production structure: - -```sh -sudo rsync -av --exclude .git --chown=odoo:odoo ./Extended/ /opt/odoo/custom/ -``` - ### Modules by Odoo Community Association **Location:** `/Community` @@ -84,12 +65,9 @@ Subsequent updates: git pull --recurse-submodules ``` -To install into the production structure: +## To install into the production structure: ```sh -for i in $(cat selected_oca_modules.txt) -do sudo rsync -av --exclude .git --chown odoo:odoo ./Community/oca/${i%/} \ - /opt/odoo/community/ -done +sudo ./install_all.sh ``` diff --git a/install_all.sh b/install_all.sh index 258cadb..002e37e 100755 --- a/install_all.sh +++ b/install_all.sh @@ -8,20 +8,47 @@ if [ $UID != 0 ]; then exit 1 fi -DEST=/opt/odoo -OPTIONS="-av --exclude .git --chown odoo:odoo" +DESTDIR=/opt/odoo +OPTIONS="-av --exclude '*pyc' --exclude '[^e]*.po' --exclude '.git' --chown odoo:odoo" +REPO="Odoo 14.0 core" SRC=./odoo/ -sudo rsync $OPTIONS $SRC $DEST/core/ +DEST=$DESTDIR/core/ +echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +echo "Copy $REPO into production directory structure" +echo " …from $SRC to $DEST" +echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +sudo rsync $OPTIONS $SRC $DEST +REPO="Avancys v14 for Agofer" SRC=./v14_avancys_agofer/ -sudo rsync $OPTIONS --exclude-from=rejected_proprietary_modules.txt $SRC $DEST/vendor/ +DEST=$DESTDIR/vendor/ +echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +echo "Copy $REPO into production directory structure" +echo "(selected modules)" +echo " …from $SRC to $DEST" +echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +sudo rsync $OPTIONS --exclude-from=rejected_proprietary_modules.txt \ + $SRC $DEST +REPO="Custom in-house modules " SRC=./Extended/ -sudo rsync $OPTIONS $SRC $DEST/custom/ +DEST=$DESTDIR/custom/ +echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +echo "Copy $REPO into production directory structure" +echo " …from $SRC to $DEST" +echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +sudo rsync $OPTIONS $SRC $DEST +REPO="Modules by Odoo Community Association" SRC=./Community/oca +DEST=$DESTDIR/community/ +echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +echo "Copy $REPO into production directory structure" +echo "(selected modules)" +echo " …from $SRC to $DEST" +echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" for i in $(cat selected_oca_modules.txt) - do sudo rsync $OPTIONS $SRC/${i%/} $DEST/community/ + do sudo rsync $OPTIONS $SRC/${i%/} $DEST done