From 0199b3184ffb12f6904f3760c4bcf2b744c3049f Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Mon, 24 Nov 2025 14:16:43 -0800 Subject: [PATCH] Make serve support both python and python3 --- serve | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/serve b/serve index c691ae7..2c23097 100755 --- a/serve +++ b/serve @@ -1,4 +1,8 @@ #!/bin/bash PORT="${1:-8080}" -python -m SimpleHTTPServer $PORT +if which python >= /dev/null 2>&1; then + python -m SimpleHTTPServer $PORT +else + python3 -m http.server $PORT +fi