-#!/bin/bash
+#!/usr/bin/env bash
read_header()
local t_name_txt=$(echo $name_txt | $sed_cmd)
echo ".SS \"$t_name_txt\""
done
- echo "$desc_txt"
+ echo "$desc_txt" | sed -e "s/@member@/{$(echo $template_members | sed -e 's/ / | /g')}/g"
echo
echo "\\fBUsage: \\fP"
echo
echo ".fi"
fi
echo
- echo "$help_txt"
+ echo "$help_txt" | sed -e 's/^ //'
echo
if test -n "$perms_txt"; then
echo -n "\\fBpermissions:\\fP "
echo ".description = \"$desc_txt\","
echo ".usage = \"$usage_txt\","
echo ".help = "
- echo "$help_txt" | sed -e 's/^/\"/g' -e 's/$/\\n\"/g'
+ printf "%s\n" "$help_txt" | sed -e 's/^/\"/g' -e 's/$/\\n\"/g'
echo '},'
}
perms_txt=$(echo $t_perms | $sed_cmd)
desc_txt=$(echo $t_desc | $sed_cmd)
usage_txt=$(echo $t_usage | $sed_cmd)
- help_txt=$(echo $t_help | $sed_cmd)
+ help_txt=$(printf "%s\n" "$t_help" | $sed_cmd)
prototype=$(echo "$template_prototype" | $sed_cmd)
$1
done