Merge pull request 'Documents usage of install script' (#1) from optimize-rsync into main

Reviewed-on: #1
This commit is contained in:
Jorge Enrique Gómez Gómez 2021-04-07 23:54:40 +00:00
commit 79ab444efa
2 changed files with 36 additions and 31 deletions

View File

@ -19,7 +19,7 @@ To be installed into this directory structure:
## Repositories ## Repositories
### Odoo 14.0 ### Odoo 14.0 core
**Location:** `/odoo` **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 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 ### Avancys v14 for Agofer
**Location:** `/v14_avancys_agofer` **Location:** `/v14_avancys_agofer`
@ -45,13 +39,6 @@ To clone from source:
git clone git@gitlab.com:mgarcia.avancys/v14_avancys_agofer.git 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 ### Custom in-house modules
**Location:** `/Extended` **Location:** `/Extended`
@ -62,12 +49,6 @@ To clone from source:
git clone ssh://git@gitea.agofer.net:22001/Agofer/Extended.git 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 ### Modules by Odoo Community Association
**Location:** `/Community` **Location:** `/Community`
@ -84,12 +65,9 @@ Subsequent updates:
git pull --recurse-submodules git pull --recurse-submodules
``` ```
To install into the production structure: ## To install into the production structure:
```sh ```sh
for i in $(cat selected_oca_modules.txt) sudo ./install_all.sh
do sudo rsync -av --exclude .git --chown odoo:odoo ./Community/oca/${i%/} \
/opt/odoo/community/
done
``` ```

View File

@ -8,20 +8,47 @@ if [ $UID != 0 ]; then
exit 1 exit 1
fi fi
DEST=/opt/odoo DESTDIR=/opt/odoo
OPTIONS="-av --exclude .git --chown odoo:odoo" OPTIONS="-av --exclude '*pyc' --exclude '[^e]*.po' --exclude '.git' --chown odoo:odoo"
REPO="Odoo 14.0 core"
SRC=./odoo/ 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/ 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/ 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 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) for i in $(cat selected_oca_modules.txt)
do sudo rsync $OPTIONS $SRC/${i%/} $DEST/community/ do sudo rsync $OPTIONS $SRC/${i%/} $DEST
done done