CDN Preparation
[openssl-web.git] / bin / mk-apropos
index 125faa17f9ba1af7a32d80723fcfb3c2d1555b2b..b9925f6c8180a8cf77d6c25a51c7f63f2af9b2c8 100755 (executable)
@@ -2,17 +2,17 @@
 # $1 is the top of the manual page tree to look through
 
 dir=$1
-cd $dir
+cd $dir || exit
 
-for m in `find . -name '*.md.tt' | sort`; do
-    description=`grep '^OSSL-description:' $m | sed -e 's|^[^:]*: *||' -e 's|^ *"||' -e 's|" *||'`
+for m in $(find . -name '*.md.tt' | sort); do
+    description=$(grep '^OSSL-description:' $m | sed -e 's|^[^:]*: *||' -e 's|^ *"||' -e 's|" *||')
     # 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=$(echo $m | sed -e 's|\./||')
+    manname=$(basename $manfile .md.tt)
+    origmanfile=$(echo $manfile | sed -e "s|^$subdir|$origsubdir|")
     echo "| [$manname]($manname.html) | $description |"
 done