http.sh/src/route.sh
bad 52c09d888e Switch to using #!/usr/bin/env bash
This fixes http.sh on nixos, macos and probably a few other systems
2021-09-22 14:52:03 +02:00

10 lines
196 B
Bash
Executable file

#!/usr/bin/env bash
# route.sh - basic router stub
# router(uri, path)
function router() {
route+=("$1")
route+=("$(sed -E 's/:[A-Za-z0-9]+/[A-Za-z0-9.,%:\\-_]+/g' <<< "$1")")
route+=("$2")
}