diff --git a/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh b/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh index 79068417a8e..7fea83a8a3f 100755 --- a/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh +++ b/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh @@ -39,7 +39,8 @@ readonly paths=" extract_source () { git_archive pushd "$extractdir/$name-reduced" - sed -i '1 s| /bin/sh|/bin/sh|' c++/src/h5c++.in config/cmake/libh5cc.in + sed -i.bak -e '1 s| /bin/sh|/bin/sh|' c++/src/h5c++.in config/cmake/libh5cc.in + rm c++/src/h5c++.in.bak config/cmake/libh5cc.in.bak chmod a+x c++/src/h5c++.in config/cmake/libh5cc.in chmod a-x README.txt chmod a-x config/cmake/CTestScript.cmake diff --git a/Modules/ThirdParty/KWSys/UpdateFromUpstream.sh b/Modules/ThirdParty/KWSys/UpdateFromUpstream.sh index 1794b04bea9..9842327b6d4 100755 --- a/Modules/ThirdParty/KWSys/UpdateFromUpstream.sh +++ b/Modules/ThirdParty/KWSys/UpdateFromUpstream.sh @@ -15,7 +15,8 @@ readonly paths=" extract_source () { git_archive - sed -i -e '/import off/,/import on/d' "$extractdir/$name-reduced/.gitattributes" + sed -i.bak -e '/import off/,/import on/d' "$extractdir/$name-reduced/.gitattributes" + rm "$extractdir/$name-reduced/.gitattributes.bak" } . "${BASH_SOURCE%/*}/../../../Utilities/Maintenance/update-third-party.bash" diff --git a/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh b/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh index bf0310893bd..f057b368594 100755 --- a/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh +++ b/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh @@ -82,7 +82,8 @@ current_git_str=($(grep $git_tag_label $azure_pipelines_ci_filename)) current_git_tag=${current_git_str[1]} # Sed the latest ITK git tag in the Azure pipelines config file -sed -i "s/${git_tag_label}${current_git_tag}/${git_tag_label}${latest_git_tag}/g" $azure_pipelines_ci_filename +sed -i.bak -e "s/${git_tag_label}${current_git_tag}/${git_tag_label}${latest_git_tag}/g" $azure_pipelines_ci_filename +rm "${azure_pipelines_ci_filename}.bak" # Get the latest ITK Python git tag @@ -98,7 +99,8 @@ current_git_str=($(grep $python_git_tag_label $azure_pipelines_ci_filename)) current_git_tag=${current_git_str[1]} # Sed the latest ITK git tag in the Azure pipelines config file -sed -i "s/${python_git_tag_label}${current_git_tag}/${python_git_tag_label}${latest_git_tag}/g" $azure_pipelines_ci_filename +sed -i.bak -e "s/${python_git_tag_label}${current_git_tag}/${python_git_tag_label}${latest_git_tag}/g" $azure_pipelines_ci_filename +rm "${azure_pipelines_ci_filename}.bak" # Python setup file @@ -115,7 +117,8 @@ git_install_req_tag_arr=($(echo $git_install_req_tag | tr "=" " ")) current_git_tag=${git_install_req_tag_arr[-1]} # Sed the latest ITK git tag in the Python setup file -sed -i "s/${current_git_tag}/${latest_git_tag}'/g" $python_setup_filename +sed -i.bak -e "s/${current_git_tag}/${latest_git_tag}'/g" $python_setup_filename +rm "${python_setup_filename}.bak" pckg_version_label='version' @@ -139,4 +142,5 @@ new_pckg_patch_version=$((pckg_patch_version + 1)) # Update to a new major version new_pckg_version="${pckg_version_tag_str::-2}${new_pckg_patch_version}'" -sed -i "s/${pckg_version_tag_str}/${new_pckg_version}/g" $python_setup_filename +sed -i.bak -e "s/${pckg_version_tag_str}/${new_pckg_version}/g" $python_setup_filename +rm "${python_setup_filename}.bak"