acoeur/bin/apache_on_change.sh

18 lines
305 B
Bash
Raw Normal View History

2022-11-05 23:34:40 +01:00
#!/bin/sh
2022-10-26 23:12:29 +02:00
cd "$(dirname "$0")/.." || exit
line="$1"
url=$(echo "$line" | cut -d ' ' -f7)
# Remove the starting "/edit" part, which is an apache alias required to target the proper directory
url=${url#/edit*}
2022-10-26 23:12:29 +02:00
full="$(pwd)/content$url"
dir=${full%/*}
page=${url##*/}
"bin/ac_route.sh" "$dir" "$page"