Skip to content

Instantly share code, notes, and snippets.

View kritchie's full-sized avatar

kritchie

  • Montreal, QC, Canada
View GitHub Profile
@sportebois
sportebois / fmtnomad.sh
Last active November 21, 2018 15:40
Nomad job formatter (chmox+x and symlink it in your $PATH)
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
#/ Description:
#/ Run Terraform fmt on nomad file to format HCL, and update the file in place.
#/
#/ Arguments:
#/ $1 the nomad flie
#/ --diff if set, then do not write the changes, but show the diff between current and cacnonical format