Skip to content

Commit

Permalink
Deal with Synology Drive fuckery
Browse files Browse the repository at this point in the history
The idiots at Synology make their Drive app add execute bits to every
fucking file, whether or not it needs it.

Clean up that garbage.

Signed-off-by: Joe Block <[email protected]>
  • Loading branch information
unixorn committed Oct 5, 2024
1 parent af82716 commit f748a6f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ help:
# If this pukes trying to import paho, try running 'poetry install'
MODULE_VERSION=$(shell grep '^version' pyproject.toml | cut -d= -f2 | sed s/\"//g | sed s/\ //g)

clean: ## Cleans out stale wheels, generated tar files, .pyc and .pyo files
clean-synology-fuckery: ## Deal with Synology's obsession with adding executable bits everywhere
chmod 600 poetry.lock Docker* LICENSE Makefile *.toml .gitignore .editorconfig .flake8 *.y*ml .*.y*ml .*.json .trivyignore
find . -iname '*.py' -exec chmod 644 '{}' ';'
find . -iname '*.md' -exec chmod 644 '{}' ';'
find . -iname '*.txt' -exec chmod 644 '{}' ';'
find .github -type f -exec chmod 644 '{}' ';'
find tests -type f -exec chmod 644 '{}' ';'

clean: clean-synology-fuckery ## Cleans out stale wheels, generated tar files, .pyc and .pyo files
rm -fv dist/*.tar dist/*.whl
find . -iname '*.py[co]' -delete

Expand Down

0 comments on commit f748a6f

Please sign in to comment.