forked from mirrors/nixpkgs
update-source-version: Escape plus sign if it occurs in version
This commit is contained in:
parent
d6cc334d6b
commit
e3b0c03507
|
@ -39,8 +39,8 @@ if [ "$oldVersion" = "$newVersion" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Escape dots, there should not be any other regex characters allowed in store path names
|
# Escape regex metacharacter that are allowed in store path names
|
||||||
oldVersion=$(echo "$oldVersion" | sed -re 's|\.|\\.|g')
|
oldVersion=$(echo "$oldVersion" | sed -re 's|[.+]|\\&|g')
|
||||||
|
|
||||||
if [ $(grep -c -E "^\s*(let\b)?\s*version\s+=\s+\"$oldVersion\"" "$nixFile") = 1 ]; then
|
if [ $(grep -c -E "^\s*(let\b)?\s*version\s+=\s+\"$oldVersion\"" "$nixFile") = 1 ]; then
|
||||||
pattern="/\bversion\b\s*=/ s|\"$oldVersion\"|\"$newVersion\"|"
|
pattern="/\bversion\b\s*=/ s|\"$oldVersion\"|\"$newVersion\"|"
|
||||||
|
|
Loading…
Reference in a new issue