Skip to content

Commit

Permalink
update-source-version: Fix regex metacharacter
Browse files Browse the repository at this point in the history
In sed variety of regexes, '\|' must be used in place of '|'.
  • Loading branch information
dezgeg committed Feb 17, 2018
1 parent 8de132f commit 9c852aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/common-updater/scripts/update-source-version
Expand Up @@ -74,7 +74,7 @@ fi
if [ -z "$newHash" ]; then
nix-build --no-out-link -A "$attr.src" 2>"$attr.fetchlog" >/dev/null || true
# FIXME: use nix-build --hash here once https://github.com/NixOS/nix/issues/1172 is fixed
newHash=$(egrep -v "killing process|dependencies couldn't be built" "$attr.fetchlog" | tail -n2 | sed "s~output path .* has .* hash \(.*\) when .* was expected|fixed-output derivation produced path '.*' with .* hash '\(.*\)' instead of the expected hash '.*'~\1\2~" | head -n1)
newHash=$(egrep -v "killing process|dependencies couldn't be built" "$attr.fetchlog" | tail -n2 | sed "s~output path .* has .* hash \(.*\) when .* was expected\|fixed-output derivation produced path '.*' with .* hash '\(.*\)' instead of the expected hash '.*'~\1\2~" | head -n1)
fi

if [ -z "$newHash" ]; then
Expand Down

0 comments on commit 9c852aa

Please sign in to comment.