CDN Preparation - further speed improvement - remove not needed seds and basename...
[openssl-web.git] / bin / mk-apropos
index b9925f6c8180a8cf77d6c25a51c7f63f2af9b2c8..3c2c5793fb01a2e9a1a864edadb618997463a4d5 100755 (executable)
@@ -1,18 +1,20 @@
-#! /bin/sh
+#! /bin/bash
 # $1 is the top of the manual page tree to look through
+. ./bin/utils.sh
 
 dir=$1
 cd $dir || exit
 
 for m in $(find . -name '*.md.tt' | sort); do
-    description=$(grep '^OSSL-description:' $m | sed -e 's|^[^:]*: *||' -e 's|^ *"||' -e 's|" *||')
+#    description=$(grep '^OSSL-description:' $m | sed -e 's|^[^:]*: *||' -e 's|^ *"||' -e 's|" *||')
+    description=$(get_description $m)
     # If there isn't a description, it isn't a manpage and should not be
     # included
     if [ "$description" = "" ]; then
        continue
     fi
-    manfile=$(echo $m | sed -e 's|\./||')
-    manname=$(basename $manfile .md.tt)
-    origmanfile=$(echo $manfile | sed -e "s|^$subdir|$origsubdir|")
+    manfile=$(basename_custom $m)
+    manname=$(basename_custom $manfile .md.tt)
+    #origmanfile=$(echo $manfile | sed -e "s|^$subdir|$origsubdir|")
     echo "| [$manname]($manname.html) | $description |"
 done