📝 Update readme with cmake

This commit is contained in:
Edgar 2021-08-23 13:36:13 +02:00
parent 6e23d82c0a
commit 166f9ed947
No known key found for this signature in database
GPG Key ID: 17D930BB616061A5
4 changed files with 78 additions and 9 deletions

2
.gitignore vendored
View File

@ -22,3 +22,5 @@ _deps
build.ninja
.ninja_log
.ninja_deps

View File

@ -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(
@ -26,3 +52,12 @@ add_custom_target(
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})

View File

@ -2,4 +2,41 @@
Some bashscripts for installing devtools on Ubuntu
Available tools:
### cmake
Repo: https://github.com/kitware/cmake
`curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-cmake.sh" | sudo bash`
### sccache
Repo: https://github.com/mozilla/sccache
`curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-sccache.sh" | sudo bash`
### duf
Repo: https://github.com/muesli/duf
`curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-duf.sh" | sudo bash`
### lazygit
Repo: https://github.com/jesseduffield/lazygit
`curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-lazygit.sh" | sudo bash`
### butler
Repo: https://github.com/itchio/butler
`curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-butler.sh" | sudo bash`
### conan
Repo: https://github.com/conan-io/conan
`curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-conan.sh" | sudo bash`

View File

@ -2,11 +2,6 @@ macro(mgs text)
execute_process(COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green --bold ${text})
endmacro()
string(REPLACE "/" ";" RLIST "${GH_REPO}")
list(GET RLIST 0 OWNER)
list(GET RLIST 1 TOOL)
mgs("TOOL \"${TOOL}\" OWNER \"${OWNER}\"")
SET(URL "https://api.github.com/repos/${OWNER}/${TOOL}/releases/latest")