Skip to content

Commit b8c4168

Browse files
committed
Update file listing commands to improve entr(1) file watching
1 parent f83817d commit b8c4168

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.tmuxp.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ windows:
1212
panes:
1313
- focus: true
1414
- pane
15-
- find . -type f -not -path '*/\.*' | grep -i '.*[.]py$' | entr -c ./run-tests.py
15+
- if command -v entr > /dev/null; then find . -type f -not -path '*/\.*' | grep -i '.*[.]py$' | entr -c ./run-tests.py; else ./run-tests.py; echo "\nInstall entr(1) to automatically run tests on file change.\n See http://entrproject.org/"; fi
16+
1617
- window_name: docs
1718
layout: main-horizontal
1819
options:
@@ -24,4 +25,4 @@ windows:
2425
- focus: true
2526
- pane
2627
- echo 'docs built to <http://0.0.0.0:8003/_build/html>'; python -m SimpleHTTPServer 8003
27-
- find .. -print | grep -i '.*[.]rst' | entr -c make html
28+
- if command -v entr > /dev/null; then find .. -print | grep -i '.*[.]rst' | entr -c make html; else make html; echo "\nInstall entr(1) to automatically rebuild documentation when files change. \nSee http://entrproject.org/"; fi

bootstrap_env.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,12 @@ def which(exe=None, throw=True):
108108
def main():
109109
if not which('entr', throw=False):
110110
message = (
111-
'entr(1) is used in this app as a cross platform file watcher.'
111+
'\nentr(1) is used in this app as a cross platform file watcher.'
112112
'You can install it via your package manager on most POSIX '
113-
'systems. See the site at http://entrproject.org/'
113+
'systems. See the site at http://entrproject.org/\n'
114114
)
115-
fail(message)
115+
print(message)
116+
116117
if not virtualenv_exists:
117118
virtualenv_bin = which('virtualenv', throw=False)
118119

0 commit comments

Comments
 (0)