Skip to content

Commit

Permalink
Use standardized check-bash script (#974)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Heuermann <jan@jotaen.net>
  • Loading branch information
jotaen4tinypilot and jotaen authored May 6, 2022
1 parent aeb9af5 commit f34beaa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions dev-scripts/check-bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ set -u

BASH_SCRIPTS=()

while read -r line; do
if head -n 1 "${line}" | grep --quiet "#!/bin/bash"; then
BASH_SCRIPTS+=("${line}")
while read -r filepath; do
if head -n 1 "${filepath}" | grep --quiet \
--regexp '#!/bin/bash' \
--regexp '#!/usr/bin/env bash' \
--regexp '#!/usr/sh' \
--regexp '#!/usr/bin/env sh' \
; then
BASH_SCRIPTS+=("${filepath}")
fi
done < <(git ls-files)

Expand Down

0 comments on commit f34beaa

Please sign in to comment.