pvc-bootstrap/format
Joshua M. Boniface 379262a74f Initial commit of PVC Bootstrap system
Adds the PVC Bootstrap system, which allows the automated deployment of
one or more PVC clusters.
2022-01-02 00:38:02 -05:00

23 lines
386 B
Bash
Executable File

#!/usr/bin/env bash
if ! which black &>/dev/null; then
echo "Black is required to format this project"
exit 1
fi
if [[ $1 == "check" ]]; then
check="--check"
fi
pushd $( git rev-parse --show-toplevel ) &>/dev/null
echo ">>> Formatting..."
black --safe ${check} .
ret=$?
if [[ $ret -eq 0 ]]; then
echo "Successfully formatted project!"
fi
popd &>/dev/null
exit $ret