From d593a7c1265b20a22742416f689097f55cce3f3b Mon Sep 17 00:00:00 2001 From: Rodolfo Berrios <20590102+rodber@users.noreply.github.com> Date: Sat, 27 Nov 2021 12:23:31 -0300 Subject: [PATCH] improves ignored files --- .gitignore | 11 +++++++++-- sync.sh | 10 ++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d091b55..6fe680a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ .DS_Store -app/settings.php -app/vendor +/app/settings.php +/app/vendor +/content/images/users +/content/images/system/* +!/content/images/system/default +/content/pages +!/content/pages/default/ +/images/* +!/images/.htaccess diff --git a/sync.sh b/sync.sh index 83e3c79..841dff8 100644 --- a/sync.sh +++ b/sync.sh @@ -5,13 +5,19 @@ TARGET=/var/www/html/ EXCLUDE="\.git|\.DS_Store|\/docs" cp "${SOURCE}".gitignore "${TARGET}".gitignore function sync() { + cp "${SOURCE}"sync.sh /var/www/sync.sh rsync -r -I -og \ --chown=www-data:www-data \ --info=progress2 \ + --exclude '.git' \ + --include 'content/images/system/default/*' \ + --include 'content/pages/default/*' \ + --exclude 'sync.sh' \ + --exclude 'content/images/system/*' \ + --exclude 'content/images/users/*' \ + --exclude 'content/pages/*' \ --filter=':- .gitignore' \ --filter=':- .dockerignore' \ - --exclude '.git' \ - --exclude 'sync.sh' \ --delete \ $SOURCE $TARGET }