Menu item "Checkout" spawns a dialog, thus requires ellipsis
[qgit4/redivivus.git] / src / helpgen.sh
blob65dbbd5ae3b87085e87f783098435b0b372146bf
1 #!/bin/sh
3 # Generate help.h from README
5 set -e
7 infile="$1"
8 outfile="$2"
9 tmpfile1="$2.t1"
10 tmpfile2="$2.t2"
12 asciidoc --attribute 'newline=\n' --backend=html4 --no-header-footer \
13 --out-file="$tmpfile1" "$infile"
15 sed -n -e 's/"/\\"/g' -e '/Command line arguments/,$s/^.*$/"&\\n"/p' \
16 "$tmpfile1" >"$tmpfile2"
18 cat >"$outfile" <<EOF
19 /* Help content is generated automatically from README by helpgen script */
21 static const char* helpInfo =
22 "<qt>\n"
23 "<center><h1>QGit Handbook</h1></center>\n"
24 `cat "$tmpfile2"`
25 "</qt>\n";
26 EOF
28 rm -f "$tmpfile1" "$tmpfile2"