summaryrefslogtreecommitdiffstats
path: root/usr.sbin/httpd/src/helpers/fp2rp
blob: 68d5adb6d199be94a42808811fd6dc61d00392d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
##
## fp2rp -- convert a standard forward path to a reverse dotted path
##
if [ "x$1" = "x." ]; then
    rp="."
else
    rp=""
    for pe in `IFS="$IFS/"; echo $1`; do
        rp="../$rp"
    done
fi
echo $rp | sed -e 's:/$::'