[FIX] Uses correct syntax for rsync excludes

This commit is contained in:
Jorge Enrique Gómez Gómez 2021-04-07 20:40:03 -05:00
parent eb2336bfec
commit 8086a062f0
2 changed files with 10 additions and 5 deletions

View File

@ -0,0 +1,5 @@
.git
.gitignore
.vscode
*.py[co]
[^e]*.po

View File

@ -9,7 +9,7 @@ if [ $UID != 0 ]; then
fi fi
DESTDIR=/opt/odoo DESTDIR=/opt/odoo
OPTIONS="-av --exclude '*pyc' --exclude '[^e]*.po' --exclude '.git' --chown odoo:odoo" OPTIONS="-av --exclude-from=common_exclude_patterns.txt --chown odoo:odoo"
cp_core () cp_core ()
{ {
@ -20,7 +20,7 @@ cp_core ()
echo "Copy $REPO into production directory structure" echo "Copy $REPO into production directory structure"
echo " …from $SRC to $DEST" echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
sudo rsync $OPTIONS $SRC $DEST rsync $OPTIONS $SRC $DEST
} }
cp_vendor () cp_vendor ()
@ -33,7 +33,7 @@ cp_vendor ()
echo "(selected modules)" echo "(selected modules)"
echo " …from $SRC to $DEST" echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
sudo rsync $OPTIONS --exclude-from=rejected_proprietary_modules.txt \ rsync $OPTIONS --exclude-from=rejected_proprietary_modules.txt \
$SRC $DEST $SRC $DEST
} }
@ -46,7 +46,7 @@ cp_custom ()
echo "Copy $REPO into production directory structure" echo "Copy $REPO into production directory structure"
echo " …from $SRC to $DEST" echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
sudo rsync $OPTIONS $SRC $DEST rsync $OPTIONS $SRC $DEST
} }
cp_community () cp_community ()
@ -60,7 +60,7 @@ cp_community ()
echo " …from $SRC to $DEST" echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
for i in $(cat selected_oca_modules.txt) for i in $(cat selected_oca_modules.txt)
do sudo rsync $OPTIONS $SRC/${i%/} $DEST do rsync $OPTIONS $SRC/${i%/} $DEST
done done
} }