From a9dbf594a7b51bfb2ff9d73aa3b2f3687936f409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20E=2E=20G=C3=B3mez?= Date: Sat, 8 Oct 2022 10:15:58 -0500 Subject: [PATCH] [ADD] New repo from Avancys --- .gitignore | 2 ++ install_odoo_code.sh | 14 +++++++------- update_from_repo.sh | 37 +++++++++++++++++++++++++++++++------ 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 1e529c7..16e1476 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ community/ core/ custom/ vendor/ +vendor01/ +vendor02/ special/ diff --git a/install_odoo_code.sh b/install_odoo_code.sh index a0b5023..a8181e9 100755 --- a/install_odoo_code.sh +++ b/install_odoo_code.sh @@ -13,12 +13,12 @@ OPTIONS="-av --exclude-from=common_exclude_patterns.txt --chown odoo:odoo" Help () { - echo "Usage: $0 [-h] -o={all|core|community|apps|vendor|special|custom}" + echo "Usage: $0 [-h] -o={all|core|community|apps|vendor|vendor02|custom}" echo echo "Options:" echo "-h Help (display this text)" echo "-o Modules to be installed (one of 'all', 'core', 'community'," - echo " 'apps', 'vendor', 'special, 'custom'). Required." + echo " 'apps', 'vendor', 'vendor02, 'custom'). Required." echo } @@ -85,11 +85,11 @@ cp_vendor () echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" } -cp_special () +cp_vendor02 () { REPO="Special Avancys v14 electronic invoice" - SRC=./special/ - DEST=$DESTDIR/v14-electronic-documents/ + SRC=./vendor02/ + DEST=$DESTDIR/vendor02/ # Exclude modules/files already included in other repos: EXCL="--exclude-from=rejected_special_modules.txt" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" @@ -160,8 +160,8 @@ case $Modules in 'vendor') # Install Avancys modules cp_vendor exit;; - 'special') # Install Avancys e-invoice modules - cp_special + 'vendor02') # Install Avancys e-invoice modules + cp_vendor02 exit;; 'custom') # Install Custom modules developed in-house cp_custom diff --git a/update_from_repo.sh b/update_from_repo.sh index b15f632..4cf6d27 100755 --- a/update_from_repo.sh +++ b/update_from_repo.sh @@ -5,12 +5,12 @@ Help () { - echo "Usage: $0 [-h] -o={all|core|community|vendor|special|custom}" + echo "Usage: $0 [-h] -o={all|core|community|vendor|vendor02|custom}" echo echo "Options:" echo "-h Help (display this text)" echo "-o Repositories to be updated (one of 'all', 'core', 'community'," - echo " 'vendor', 'special, 'custom'). Required." + echo " 'vendor', 'vendor02, 'custom'). Required." echo } @@ -77,11 +77,33 @@ gt_vendor () fi } -gt_special () +gt_vendor01 () { REPO="Special repo for electronic invoice 1.8 by Avancys" SRC=git@gitlab.com:mgarcia.avancys/v14-facturacionelectronica.git - DEST=./special/ + # ERROR: Repo was removed + DEST=./vendor01/ + OPTIONS="" + if [ ! -d "$DEST" ]; then + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + echo "Clone $REPO" + echo " …to $DEST" + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + git clone $OPTIONS $SRC $DEST + else + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + echo "Update $REPO" + echo " …in $DEST" + echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + git -C $DEST pull + fi +} + +gt_vendor02 () +{ + REPO="Special repo for electronic documents by Avancys" + SRC=git@gitlab.com:mgarcia.avancys/v14-electronic-documents-agofer.git + DEST=./vendor02/ OPTIONS="" if [ ! -d "$DEST" ]; then echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" @@ -161,8 +183,11 @@ case $Modules in 'vendor') # Download from repo Avancys modules gt_vendor exit;; - 'special') # Download from special repo Avancys e-invoice modules - gt_special + 'vendor01') # Repo was removed. Do not use + gt_vendor01 + exit;; + 'vendor02') # Download from special repo Avancys e-invoice modules + gt_vendor02 exit;; 'custom') # Download from repo Custom modules developed in-house gt_custom