mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-07 02:31:17 +08:00
Minor script cleanup
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
set -o pipefail
|
||||
|
||||
sponge() {
|
||||
local data
|
||||
data="$(cat)"
|
||||
printf '%s\n' "$data" > "$1"
|
||||
}
|
||||
@@ -22,7 +23,7 @@ modify() {
|
||||
}
|
||||
|
||||
detestify() {
|
||||
echo "-- AUTOGENERATED from ShellCheck by striptests. Do not modify."
|
||||
printf '%s\n' '-- AUTOGENERATED from ShellCheck by striptests. Do not modify.'
|
||||
awk '
|
||||
BEGIN {
|
||||
state = 0;
|
||||
@@ -52,7 +53,7 @@ detestify() {
|
||||
|
||||
|
||||
|
||||
if [[ ! -e ShellCheck.cabal ]]
|
||||
if [[ ! -e 'ShellCheck.cabal' ]]
|
||||
then
|
||||
echo "Run me from the ShellCheck directory." >&2
|
||||
exit 1
|
||||
@@ -64,7 +65,7 @@ then
|
||||
exit 2
|
||||
fi
|
||||
|
||||
modify ShellCheck.cabal sed -e '
|
||||
modify 'ShellCheck.cabal' sed -e '
|
||||
/QuickCheck/d
|
||||
/^test-suite/{ s/.*//; q; }
|
||||
'
|
||||
|
Reference in New Issue
Block a user