diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2017-06-09 00:35:17 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2017-12-26 20:02:01 +0200 |
commit | 022b0c9abc99f85cff1f9170ec04315406fb26d9 (patch) | |
tree | 4117ac66ab1ec17cc1430caaebfebfa42b52f459 /pkgs/common-updater/scripts/update-source-version | |
parent | ce421a7283d88b3c9d8f16c9d3e277f678fda15c (diff) |
update-source-version: Don't require whitespace around equals sign
Diffstat (limited to 'pkgs/common-updater/scripts/update-source-version')
-rwxr-xr-x | pkgs/common-updater/scripts/update-source-version | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/common-updater/scripts/update-source-version b/pkgs/common-updater/scripts/update-source-version index 243358beb70bc..b383f7d131e96 100755 --- a/pkgs/common-updater/scripts/update-source-version +++ b/pkgs/common-updater/scripts/update-source-version @@ -42,9 +42,9 @@ fi # Escape regex metacharacter that are allowed in store path names 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\"|" -elif [ $(grep -c -E "^\s*(let\b)?\s*name\s+=\s+\"[^-]+-$oldVersion\"" "$nixFile") = 1 ]; then +elif [ $(grep -c -E "^\s*(let\b)?\s*name\s*=\s*\"[^-]+-$oldVersion\"" "$nixFile") = 1 ]; then pattern="/\bname\b\s*=/ s|-$oldVersion\"|-$newVersion\"|" else die "Couldn't figure out where out where to patch in new version in '$attr'!" |