snippet #!
    #!/bin/bash -eu
    set -o pipefail

snippet BASE
    BASE_DIR="$(cd "$(dirname "\$0")"; pwd)"