From: g0dil Date: Wed, 26 Aug 2009 14:01:46 +0000 (+0000) Subject: Fix abspath() shell function in doclib/doxygen.sh X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=afec07bb5f32a732cb30499da5468e89516764cf;p=senf.git Fix abspath() shell function in doclib/doxygen.sh git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1343 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/doclib/doxygen.sh b/doclib/doxygen.sh index 6abbe0d..7061ee4 100755 --- a/doclib/doxygen.sh +++ b/doclib/doxygen.sh @@ -18,13 +18,15 @@ abspath() /*) echo "$1" ;; *) echo "`pwd`/$1" ;; esac | sed \ - -e 's/\/\//\//g' \ + -e 's/\/\/*/\//g' \ -e:a \ -e 's/\/\.\(\/\|$\)/\1/g' \ -eta \ -e:b \ - -e 's/\/[^\/]*\/..\(\/\|$\)/\1/g' \ - -etb + -e 's/\/[^\/]*\/..\(\/\|$\)/\1/' \ + -etb \ + -e 's/^\(\/..\)*\(\/\|$\)/\2/' \ + -e 's/^$/\//' } # Create relative path from absolute directory $1 to absolute path $2 @@ -78,13 +80,13 @@ html="NO"; tagfile="NO"; tagfile_name=""; tagfiles=""; output_dir="doc"; html_di while true; do case "$1" in - --html) + --html) html="YES" ; shift ;; - --tagfile) + --tagfile) tagfile="YES" ; shift ;; - --tagfile-name) + --tagfile-name) tagfile_name="$2"; shift 2 ;; - --tagfiles) + --tagfiles) for f in $2; do f="`abspath "$f"`" #`" tagfiles="$tagfiles${tagfiles:+ }$f" @@ -147,7 +149,7 @@ cd "$doxydir" ## Remove tagfile_name from list of tagfiles -if [ -n "$tagfile_name" ]; then +if [ -n "$tagfile_name" ]; then tagfile_name="`abspath "$output_dir/$tagfile_name"`" #`" x="$tagfiles"; tagfiles="" for f in $x; do