Skip to content

Commit 67f82c8

Browse files
committed
Allow passing options to server script
1 parent 1f26c31 commit 67f82c8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/start-server.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/usr/bin/env bash
22

33
# Convenience script to start a Jupyter notebook server in a self-contained
4-
# virtualenv.
4+
# virtualenv. Additional `jupyter notebook` options may be passed when running
5+
# the command, for example `./scripts/start-server.sh --ip xx.local` to expose
6+
# the server on the local network.
57

68
set -o nounset
79
set -o errexit
@@ -10,7 +12,7 @@ shopt -s nullglob
1012

1113
__dirname="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1214

13-
main() {
15+
main() { # [...]
1416
cd "$__dirname/.."
1517
if [ -d venv ]; then
1618
. venv/bin/activate
@@ -20,7 +22,7 @@ main() {
2022
fi
2123
pip install jupyter
2224
pip install -r requirements.txt
23-
jupyter notebook resources
25+
jupyter notebook resources "$@"
2426
}
2527

2628
main "$@"

0 commit comments

Comments
 (0)