improves ignored files

This commit is contained in:
Rodolfo Berrios 2021-11-27 12:23:31 -03:00
parent 49fe81cc57
commit d593a7c126
No known key found for this signature in database
GPG key ID: D3AAC2481DBDD9FE
2 changed files with 17 additions and 4 deletions

11
.gitignore vendored
View file

@ -1,3 +1,10 @@
.DS_Store .DS_Store
app/settings.php /app/settings.php
app/vendor /app/vendor
/content/images/users
/content/images/system/*
!/content/images/system/default
/content/pages
!/content/pages/default/
/images/*
!/images/.htaccess

10
sync.sh
View file

@ -5,13 +5,19 @@ TARGET=/var/www/html/
EXCLUDE="\.git|\.DS_Store|\/docs" EXCLUDE="\.git|\.DS_Store|\/docs"
cp "${SOURCE}".gitignore "${TARGET}".gitignore cp "${SOURCE}".gitignore "${TARGET}".gitignore
function sync() { function sync() {
cp "${SOURCE}"sync.sh /var/www/sync.sh
rsync -r -I -og \ rsync -r -I -og \
--chown=www-data:www-data \ --chown=www-data:www-data \
--info=progress2 \ --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=':- .gitignore' \
--filter=':- .dockerignore' \ --filter=':- .dockerignore' \
--exclude '.git' \
--exclude 'sync.sh' \
--delete \ --delete \
$SOURCE $TARGET $SOURCE $TARGET
} }