From b754ac67a7fb98d07671229d68f2265e2caf7f81 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 20 May 2017 19:14:54 +0200 Subject: [PATCH] version number bump script: fix error when code name contains a slash --- tools/development/bump_version_set_code_name.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/development/bump_version_set_code_name.sh b/tools/development/bump_version_set_code_name.sh index cbb89c5fe..ba4cec04b 100755 --- a/tools/development/bump_version_set_code_name.sh +++ b/tools/development/bump_version_set_code_name.sh @@ -52,7 +52,7 @@ function update_news { exit 1 fi - sed -i -Ee "s/^# Version \\?$/${message}/" NEWS.md + perl -pi -e "s{^# Version \\?\$}{\\Q${message}\\E}" NEWS.md } function update_spec { @@ -76,7 +76,7 @@ function update_files { perl -pi -e 's/^MKVToolNix '$FROM'$/MKVToolNix '$TO'/' README.md perl -pi -e 's/^Building MKVToolNix [0-9.]+/Building MKVToolNix '$TO'/i' README.Windows.md perl -pi -e 's/define PRODUCT_VERSION \"'$FROM'\"/define PRODUCT_VERSION \"'$TO_NSI'\"/' installer/mkvtoolnix.nsi - perl -pi -e 's/#define VERSIONNAME.*/#define VERSIONNAME "'${CODENAME}'"/' src/common/version.cpp + perl -pi -e 's{#define VERSIONNAME.*}{#define VERSIONNAME "\Q'${CODENAME}'\E"}' src/common/version.cpp } function update_docs {