From 9f6b21df21cd7fc1fdc446b1e4bc76b68384a93b Mon Sep 17 00:00:00 2001 From: Rob Muhlestein Date: Wed, 27 Jul 2022 18:18:40 +0000 Subject: [PATCH] Add scentr for automatic entr shellcheck --- scripts/scentr | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/scentr diff --git a/scripts/scentr b/scripts/scentr new file mode 100755 index 0000000..6e89412 --- /dev/null +++ b/scripts/scentr @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# This script will monitor the passed script (by path, default is +# 'build') for changes using entr and run shellcheck when changes are +# detected. + +declare script=build + +if [[ -n "$1" ]]; then + script=$1 +fi + +entr bash -c 'clear; shellcheck '"$script" <<< "$script"