commit ff77b34d356a769104432ee3814af860f8f4f842 parent 75ddbd18f22ee11f7a0d1260e6c8221e8a857485 Author: gearsix <gearsix@tuta.io> Date: Sun, 25 Sep 2022 12:38:19 +0100 added $port arg to pyserve.sh; removed pyserve.py (it was a copy of the .sh?) Diffstat:
D | src/posix/pyserve.py | | | 7 | ------- |
M | src/posix/pyserve.sh | | | 6 | ++++-- |
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/posix/pyserve.py b/src/posix/pyserve.py @@ -1,7 +0,0 @@ -#!/usr/bin/env sh - -dir="." - -if [ $1 ]; then dir=$1; fi - -python3 -m http.server --directory $dir diff --git a/src/posix/pyserve.sh b/src/posix/pyserve.sh @@ -1,7 +1,9 @@ #!/usr/bin/env sh dir="." +port="8001" -if [ $1 ]; then dir=$1; fi +if [ "$1" ]; then dir="$1"; fi +if [ "$2" ]; then port="$2"; fi -python3 -m http.server --directory $dir +python3 -m http.server --directory "$dir" "$port"