acoeur/bin/apache_on_change.sh

18 lines
305 B
Bash
Executable File

#!/bin/sh
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*}
full="$(pwd)/content$url"
dir=${full%/*}
page=${url##*/}
"bin/ac_route.sh" "$dir" "$page"