summaryrefslogtreecommitdiff
path: root/Justfile
diff options
context:
space:
mode:
Diffstat (limited to 'Justfile')
-rw-r--r--Justfile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Justfile b/Justfile
index f9c481c..0078339 100644
--- a/Justfile
+++ b/Justfile
@@ -325,8 +325,24 @@ spawn-vm rebuild="0" type="qcow2" ram="6G":
# Runs shell check on all Bash scripts
lint:
+ #!/usr/bin/env bash
+ set -eoux pipefail
+ # Check if shellcheck is installed
+ if ! command -v shellcheck &> /dev/null; then
+ echo "shellcheck could not be found. Please install it."
+ exit 1
+ fi
+ # Run shellcheck on all Bash scripts
/usr/bin/find . -iname "*.sh" -type f -exec shellcheck "{}" ';'
# Runs shfmt on all Bash scripts
format:
+ #!/usr/bin/env bash
+ set -eoux pipefail
+ # Check if shfmt is installed
+ if ! command -v shfmt &> /dev/null; then
+ echo "shellcheck could not be found. Please install it."
+ exit 1
+ fi
+ # Run shfmt on all Bash scripts
/usr/bin/find . -iname "*.sh" -type f -exec shfmt --write "{}" ';'