📝 Update readme with cmake
This commit is contained in:
@@ -6,18 +6,44 @@ set(TOOLS
|
||||
"kitware/cmake"
|
||||
"mozilla/sccache"
|
||||
"muesli/duf"
|
||||
"jesseduffield/lazygit"
|
||||
)
|
||||
|
||||
set(EXTRA_TOOLS
|
||||
"itchio/butler"
|
||||
"conan-io/conan"
|
||||
)
|
||||
|
||||
set(TOOL_TMP [==[
|
||||
### @TOOL@
|
||||
|
||||
Repo: https://github.com/@item@
|
||||
|
||||
`curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-@TOOL@.sh" | sudo bash`
|
||||
]==])
|
||||
|
||||
set(README [==[
|
||||
# ci-scripts
|
||||
|
||||
Some bashscripts for installing devtools on Ubuntu
|
||||
|
||||
Available tools:
|
||||
@TOOL_LIST@
|
||||
]==])
|
||||
|
||||
foreach (item IN ITEMS ${TOOLS})
|
||||
string(REPLACE "/" ";" RLIST ${item})
|
||||
string(REPLACE "/" ";" RLIST "${item}")
|
||||
list(GET RLIST 0 OWNER)
|
||||
list(GET RLIST 1 TOOL)
|
||||
add_custom_target(
|
||||
${TOOL}
|
||||
COMMAND ${CMAKE_COMMAND} -DGH_REPO=${item} -P ${CMAKE_SOURCE_DIR}/update.cmake
|
||||
COMMAND ${CMAKE_COMMAND} -DOWNER=${OWNER} -DTOOL=${TOOL} -P ${CMAKE_SOURCE_DIR}/update.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
VERBATIM
|
||||
)
|
||||
list(APPEND all_tools ${TOOL})
|
||||
string(CONFIGURE ${TOOL_TMP} README_LINE)
|
||||
set(TOOL_LIST "${TOOL_LIST}\n${README_LINE}")
|
||||
endforeach ()
|
||||
|
||||
add_custom_target(
|
||||
@@ -25,4 +51,13 @@ add_custom_target(
|
||||
COMMENT "Update all tools"
|
||||
DEPENDS ${all_tools}
|
||||
VERBATIM
|
||||
)
|
||||
)
|
||||
|
||||
foreach (item IN ITEMS ${EXTRA_TOOLS})
|
||||
string(REPLACE "/" ";" RLIST ${item})
|
||||
list(GET RLIST 1 TOOL)
|
||||
string(CONFIGURE ${TOOL_TMP} README_LINE)
|
||||
set(TOOL_LIST "${TOOL_LIST}\n${README_LINE}")
|
||||
endforeach ()
|
||||
|
||||
file(CONFIGURE OUTPUT ${CMAKE_SOURCE_DIR}/README.md CONTENT ${README})
|
||||
Reference in New Issue
Block a user