diff --git a/README.md b/README.md index 9198038..fbb10a1 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,16 @@ This is just the script to generate a combined PDF from the currently-online-chapters available for review. +The script also takes care of putting in the right bookmarks for all the chapters in the generated PDF file. + Go read the book from the source at +## How to generate the book? + +Run `./generate.sh`. You will need `pdftk`, and `wget` installed. + +Once the script finishes running, check the `security-engineering-3rd-edition.pdf` file. + ## Support the Authors Buy the second editions from: diff --git a/generate.sh b/generate.sh index 28d00f4..d3dcd85 100755 --- a/generate.sh +++ b/generate.sh @@ -1,5 +1,16 @@ #!/bin/bash +function assert_installed() { + for var in "$@"; do + if ! which $var &> /dev/null; then + echo "Install $var!" + exit 1 + fi + done +} + +assert_installed wget pdftk + COVER_URL=https://www.cl.cam.ac.uk/~rja14/Papers/SEv3-cover.jpg # wget --timestamping "$COVER_URL" --output-document cover.jpg