Skip to content

Instantly share code, notes, and snippets.

@yuhonas
Created May 3, 2018 11:54
Show Gist options
  • Save yuhonas/1f3e57a536a882c913461c1e52993816 to your computer and use it in GitHub Desktop.
Save yuhonas/1f3e57a536a882c913461c1e52993816 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Bash3 Boilerplate. Copyright (c) 2014, kvz.io
# See https://kvz.io/blog/2013/11/21/bash-best-practices/
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
# Set magic variables for current file & dir
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
__base="$(basename ${__file} .sh)"
__root="$(cd "$(dirname "${__dir}")" && pwd)" # <-- change this as it depends on your app
arg1="${1:-}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment