# $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