scripts: follow shfmt

pull/624/head
Daniel Martí 2 years ago committed by Andrew LeFevre
parent 82b955dfe1
commit 352d2fa73d

@ -36,7 +36,7 @@ modules=(
# TODO: consider github.com/mattn/go-sqlite3 to cover a DB and more cgo # TODO: consider github.com/mattn/go-sqlite3 to cover a DB and more cgo
) )
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
exit_code=0 exit_code=0
@ -49,9 +49,9 @@ BASE_GOFLAGS="$(go env GOFLAGS)"
CACHED_MODFILES="${SCRIPT_DIR}/cached_modfiles" CACHED_MODFILES="${SCRIPT_DIR}/cached_modfiles"
mkdir -p "${CACHED_MODFILES}" mkdir -p "${CACHED_MODFILES}"
for (( i=0; i<${#modules[@]}; i+=2 )); do for ((i = 0; i < ${#modules[@]}; i += 2)); do
module="${modules[i]}" module="${modules[i]}"
version="${modules[i+1]}" version="${modules[i + 1]}"
{ {
# Initialize an empty module, so we can run "go build", # Initialize an empty module, so we can run "go build",

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
if \ if
grep \ grep \
--recursive \ --recursive \
--files-with-matches \ --files-with-matches \
@ -9,8 +9,8 @@ if \
--max-count=1 \ --max-count=1 \
--exclude-dir="\.git" \ --exclude-dir="\.git" \
$'\r' \ $'\r' \
. \ .
; then then
# TODO exit status should be number of files with wrong endings found # TODO exit status should be number of files with wrong endings found
echo -e "Found at least a file with CRLF endings." echo -e "Found at least a file with CRLF endings."
exit 1 exit 1

Loading…
Cancel
Save