[FIX] Uses correct syntax for rsync excludes #3

Merged
jegomez merged 1 commits from fix-install-script-excludes into main 2021-04-08 01:41:13 +00:00
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
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 ()
{
@ -20,7 +20,7 @@ cp_core ()
echo "Copy $REPO into production directory structure"
echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
sudo rsync $OPTIONS $SRC $DEST
rsync $OPTIONS $SRC $DEST
}
cp_vendor ()
@ -33,7 +33,7 @@ cp_vendor ()
echo "(selected modules)"
echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
sudo rsync $OPTIONS --exclude-from=rejected_proprietary_modules.txt \
rsync $OPTIONS --exclude-from=rejected_proprietary_modules.txt \
$SRC $DEST
}
@ -46,7 +46,7 @@ cp_custom ()
echo "Copy $REPO into production directory structure"
echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
sudo rsync $OPTIONS $SRC $DEST
rsync $OPTIONS $SRC $DEST
}
cp_community ()
@ -60,7 +60,7 @@ cp_community ()
echo " …from $SRC to $DEST"
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
for i in $(cat selected_oca_modules.txt)
do sudo rsync $OPTIONS $SRC/${i%/} $DEST
do rsync $OPTIONS $SRC/${i%/} $DEST
done
}