From 8086a062f07628bd5565767295d6903d236040db Mon Sep 17 00:00:00 2001 From: "Jorge E. Gomez" Date: Wed, 7 Apr 2021 20:40:03 -0500 Subject: [PATCH] [FIX] Uses correct syntax for rsync excludes --- common_exclude_patterns.txt | 5 +++++ install_all.sh | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 common_exclude_patterns.txt diff --git a/common_exclude_patterns.txt b/common_exclude_patterns.txt new file mode 100644 index 0000000..1750125 --- /dev/null +++ b/common_exclude_patterns.txt @@ -0,0 +1,5 @@ +.git +.gitignore +.vscode +*.py[co] +[^e]*.po diff --git a/install_all.sh b/install_all.sh index 8a724eb..6b14728 100755 --- a/install_all.sh +++ b/install_all.sh @@ -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 }