File: gen.sh

package info (click to toggle)
austin 3.7.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,444 kB
  • sloc: ansic: 8,622; python: 2,669; sh: 106; makefile: 54
file content (26 lines) | stat: -rwxr-xr-x 716 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

help2man \
    -n "Frame stack sampler for CPython" \
    -i doc/examples.troff \
    src/austin > src/austin.1

VERSION=$(cat src/austin.h | sed -r -n "s/^#define VERSION[ ]+\"([0-9]+[.][0-9]+).*\"/\1/p")

# Update the version in the SVG file
if [[ $(uname) == "Darwin" ]]; then
    sed -E -i '' "s/for version [0-9]+[.][0-9]+/for version $VERSION/g" "doc/cheatsheet.svg"
else
    sed -i "s/for version [0-9]+[.][0-9]+/for version $VERSION/g" "doc/cheatsheet.svg"
fi

inkscape \
    --export-type="png" \
    --export-filename="doc/cheatsheet.png" \
    --export-dpi=192 \
    doc/cheatsheet.svg

inkscape \
    --export-type="pdf" \
    --export-filename="doc/cheatsheet.pdf" \
    doc/cheatsheet.svg