summaryrefslogtreecommitdiffstats
path: root/qemu/roms/openbios/config/scripts/reldir
blob: 50f384ec8167470549101d98a6da55734515e384 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

PREF="."
for x in 0 1 2 3 4 5 6 7 ; do
    test -f $PREF/config/configure.in && break
    PREF="../$PREF"
done
ROOT=$( echo $(pwd) | sed "s,\(//*[^/][^/]*\)\{$x\}/*\$,," )
RELNAME=$( echo $(pwd) | sed "s,^$ROOT/*,,g" )
echo $RELNAME