2021-02-14 04:20:41 +01:00
|
|
|
#!/bin/bash
|
2021-02-28 01:05:24 +01:00
|
|
|
# route.sh - basic router stub
|
2021-02-14 04:20:41 +01:00
|
|
|
|
|
|
|
# router(uri, path)
|
|
|
|
function router() {
|
|
|
|
route+=("$1")
|
2021-08-03 00:37:27 +02:00
|
|
|
route+=("$(sed -E 's/:[A-Za-z0-9]+/[A-Za-z0-9.,%:\\-_]+/g' <<< "$1")")
|
2021-02-14 04:20:41 +01:00
|
|
|
route+=("$2")
|
|
|
|
}
|