Skip to content

Commit 61de5e4

Browse files
Damian Rousonzbeekman
Damian Rouson
authored andcommitted
Fix opencoarrays_version in windows-install.sh
1 parent 84c575a commit 61de5e4

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

windows-install.sh

+1-9
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,7 @@ info "install_prefix=\"${install_prefix}\""
153153
export num_threads="${arg_j}"
154154
info "num_threads=\"${arg_j}\""
155155

156-
set_opencoarrays_version()
157-
{
158-
cmake_project_line="$(grep project "${OPENCOARRAYS_SRC_DIR}/CMakeLists.txt" | grep VERSION)"
159-
text_after_version_keyword="${cmake_project_line##*VERSION}"
160-
text_before_language_keyword="${text_after_version_keyword%%LANGUAGES*}"
161-
opencoarrays_version=$text_before_language_keyword
162-
export opencoarrays_version="${opencoarrays_version//[[:space:]]/}"
163-
}
164-
set_opencoarrays_version
156+
opencoarrays_version=$(sed -n '/[0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}/{s/^\([^.]*\)\([0-9]\{1,\}\(\.[0-9]\{1,\}\)\{1,\}\)\(.*\)/\2/p;q;}' "${OPENCOARRAYS_SRC_DIR%/}/.VERSION")
165157

166158
export build_path="${OPENCOARRAYS_SRC_DIR%/}"/prerequisites/builds/opencoarrays/$opencoarrays_version
167159
info "build_path=\"${build_path}\""

0 commit comments

Comments
 (0)