🔧 Generate scripts with cmake

This commit is contained in:
2020-10-19 12:48:06 +00:00
committed by GitHub
parent ce83235137
commit 76a08be0ef
12 changed files with 48 additions and 16 deletions

11
update.cmake Normal file
View File

@ -0,0 +1,11 @@
message("TOOL \"${TOOL}\" REPO \"${REPO}\"")
file(DOWNLOAD "https://github-get-latest-version.anotherfoxguy.workers.dev/${REPO}" "tmp/${TOOL}-version")
file(READ "tmp/${TOOL}-version" VERSION_DIRTY)
string(REGEX REPLACE /[^0-9\\.]/ "" VERSION ${VERSION_DIRTY})
string(REPLACE "." "_" VERSION_UNDERSCORE ${VERSION})
message("Latest VERSION ${VERSION}")
configure_file("templates/install-${TOOL}.sh.in" install-${TOOL}.sh @ONLY)