shellcheck: fix lint of scripts in /helper
This commit is contained in:
parent
f184bb34e6
commit
91a03ce7d2
3 changed files with 23 additions and 23 deletions
|
|
@ -7,10 +7,10 @@ flakeOutput=$2
|
|||
# A pattern in a line preceding the hash that should be updated
|
||||
patternPrecedingHash=$3
|
||||
|
||||
sed -i "/$patternPrecedingHash/,/hash/ s|hash = .*|hash = \"\";|" $file
|
||||
sed -i "/$patternPrecedingHash/,/hash/ s|hash = .*|hash = \"\";|" "$file"
|
||||
# Display stderr and capture it. stdbuf is required to disable output buffering.
|
||||
stderr=$(
|
||||
nix build --no-link -L .#$flakeOutput |&
|
||||
nix build --no-link -L ".#$flakeOutput" |&
|
||||
stdbuf -oL grep -v '\berror:.*failed to build$' |
|
||||
tee /dev/stderr || :
|
||||
)
|
||||
|
|
@ -20,5 +20,5 @@ if [[ ! $hash ]]; then
|
|||
echo "Error: No hash in build output."
|
||||
exit 1
|
||||
fi
|
||||
sed -i "/$patternPrecedingHash/,/hash/ s|hash = .*|hash = \"$hash\";|" $file
|
||||
sed -i "/$patternPrecedingHash/,/hash/ s|hash = .*|hash = \"$hash\";|" "$file"
|
||||
echo "(Note: The above hash mismatch message is not an error. It is part of the fetching process.)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue