#!/bin/sh hdr() { cat < To: discussion@lists.en.qi-hardware.com EOF } intro() { hdr case "$1" in 0) cat <&2 exit 1;; esac } diffs() { case "$1" in 1) git diff upstream/master include/linux/spi/at86rf230.h git diff upstream/master drivers/net/ieee802154/at86rf230.c ;; 2) git diff upstream/master drivers/spi ;; 3) git diff f07af316acaa03939e749a3ffe909510e5b7d536 arch/mips ;; esac } intro "$@" echo --- diffs "$@" | diffstat echo diffs "$@"