|
@@ -4,15 +4,15 @@ set -eu -o pipefail
|
|
DEBUG=${DEBUG:=0}
|
|
DEBUG=${DEBUG:=0}
|
|
if [[ "$DEBUG" = "1" ]]; then
|
|
if [[ "$DEBUG" = "1" ]]; then
|
|
set -o xtrace
|
|
set -o xtrace
|
|
|
|
+fi
|
|
|
|
|
|
if ! hash shellharden 2>/dev/null; then
|
|
if ! hash shellharden 2>/dev/null; then
|
|
cat <<< "[ERROR] 'shellharden' not found." 1>&2;
|
|
cat <<< "[ERROR] 'shellharden' not found." 1>&2;
|
|
exit 78
|
|
exit 78
|
|
fi
|
|
fi
|
|
|
|
|
|
-echo "$@"
|
|
|
|
-exit 1
|
|
|
|
-
|
|
|
|
-shellharden "$@"
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+shellharden --check "$@"
|
|
|
|
+if [[ $? -ne 0 ]]; then
|
|
|
|
+ shellharden "$@"
|
|
|
|
+ exit 2
|
|
|
|
+fi
|