This website requires JavaScript.
Explore
Help
Sign In
joshua
/
websockify
Watch
1
Star
0
Fork
You've already forked websockify
0
Code
Issues
Pull Requests
Projects
Releases
Wiki
Activity
eca301c05b
websockify
/
run
5 lines
78 B
Plaintext
Raw
Normal View
History
Unescape
Escape
run: invoke websockify through 'python -m'
2019-06-13 16:16:55 +01:00
#!/usr/bin/env sh
run: Fix shell scripting bugs * Use double quotes around `"$@"` to fix invocation with arguments including spaces. * Use double quotes around `"$(dirname "$0")"` to fix invocation inside a directory path including spaces. * Use `set -e` to abort in case `cd` fails. * Use `exec` to avoid forking an unnecessary wrapper process. * Skip an unnecessary `cd` → `pwd` → `cd` dance, just use `cd`. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-08-17 19:25:29 +01:00
set -e
cd "$(dirname "$0")"
Explicitly request Python 3 It varies between systems if /usr/bin/python is Python 2.x or Python 3.x. Since we now only work with Python 3.x we should be more explicit in our scripts and documentation.
2020-12-15 15:10:43 +00:00
exec python3 -m websockify "$@"