Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -o errexit
tmp_dir=$(mktemp -p /tmp -d vinyl.XXXXXXXXXX)
cleanup() {
local exit_code=$?
if [[ -d "${tmp_dir}" ]]; then
rm -r "${tmp_dir}"
@lollipopman
lollipopman / shellcheck-auto-fix
Created August 7, 2019 18:13
Uses shellcheck to fix any issues in a repo which shellcheck knows how to fix automatically and then commits the changes.
#!/bin/bash
INFO=$(
cat <<-'EOF'
Uses shellcheck to fix any issues in a repo which shellcheck knows how to
fix automatically and then commits the changes.
EOF
)
set -o errexit
set -o nounset