Minor script cleanup
This commit is contained in:
parent
a06d7c1841
commit
95a376aad1
2
quickrun
2
quickrun
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
# quickrun runs ShellCheck in an interpreted mode.
|
# quickrun runs ShellCheck in an interpreted mode.
|
||||||
# This allows testing changes without recompiling.
|
# This allows testing changes without recompiling.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
# quicktest runs the ShellCheck unit tests in an interpreted mode.
|
# quicktest runs the ShellCheck unit tests in an interpreted mode.
|
||||||
# This allows running tests without compiling, which can be faster.
|
# This allows running tests without compiling, which can be faster.
|
||||||
# 'cabal test' remains the source of truth.
|
# 'cabal test' remains the source of truth.
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
sponge() {
|
sponge() {
|
||||||
|
local data
|
||||||
data="$(cat)"
|
data="$(cat)"
|
||||||
printf '%s\n' "$data" > "$1"
|
printf '%s\n' "$data" > "$1"
|
||||||
}
|
}
|
||||||
|
@ -22,7 +23,7 @@ modify() {
|
||||||
}
|
}
|
||||||
|
|
||||||
detestify() {
|
detestify() {
|
||||||
echo "-- AUTOGENERATED from ShellCheck by striptests. Do not modify."
|
printf '%s\n' '-- AUTOGENERATED from ShellCheck by striptests. Do not modify.'
|
||||||
awk '
|
awk '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
state = 0;
|
state = 0;
|
||||||
|
@ -52,7 +53,7 @@ detestify() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [[ ! -e ShellCheck.cabal ]]
|
if [[ ! -e 'ShellCheck.cabal' ]]
|
||||||
then
|
then
|
||||||
echo "Run me from the ShellCheck directory." >&2
|
echo "Run me from the ShellCheck directory." >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -64,7 +65,7 @@ then
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
modify ShellCheck.cabal sed -e '
|
modify 'ShellCheck.cabal' sed -e '
|
||||||
/QuickCheck/d
|
/QuickCheck/d
|
||||||
/^test-suite/{ s/.*//; q; }
|
/^test-suite/{ s/.*//; q; }
|
||||||
'
|
'
|
||||||
|
|
Loading…
Reference in New Issue