🔧 Generate scripts with cmake
This commit is contained in:
parent
ce83235137
commit
76a08be0ef
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
tmp
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
Some bashscripts for installing devtools on Ubuntu
|
Some bashscripts for installing devtools on Ubuntu
|
||||||
|
|
||||||
`curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-lastversion.sh" | sudo bash`
|
`curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-conan.sh" | sudo bash`
|
@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
cd /tmp/
|
wget "https://github.com/Kitware/CMake/releases/download/v3.18.4/cmake-3.18.4-Linux-x86_64.sh" -nv -O /tmp/cmake.sh
|
||||||
lastversion Kitware/CMake --assets --filter sh -d
|
sh /tmp/cmake.sh --exclude-subdir --prefix=/usr/local
|
||||||
sh $(find . -name "cmake-*-Linux-x86_64.sh") --exclude-subdir --prefix=/usr/local
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
cd /tmp/
|
wget "https://dl.bintray.com/conan/installers/conan-ubuntu-64_1_30_2.deb" -nv -O /tmp/conan.deb
|
||||||
lastversion conan-io/conan --assets --filter deb -d
|
dpkg -i /tmp/conan.deb
|
||||||
dpkg -i $(find . -name "conan-ubuntu-64*.deb")
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
wget "https://github.com/AnotherFoxGuy/ci-scripts/raw/main/lastversion" -O "/tmp/lastversion"
|
|
||||||
install -m 755 "/tmp/lastversion" "/usr/local/bin/"
|
|
@ -1,8 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
cd /tmp/
|
|
||||||
mkdir -p /tmp/sccache
|
mkdir -p /tmp/sccache
|
||||||
lastversion mozilla/sccache --assets --filter linux -d
|
wget "https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz" -nv -O /tmp/sccache.tar.gz
|
||||||
tar xvzf $(find . -name "sccache-*.tar.gz") --strip 1 -C /tmp/sccache
|
tar xvzf /tmp/sccache.tar.gz --strip 1 -C /tmp/sccache
|
||||||
install -m 755 /tmp/sccache/sccache /usr/local/bin/
|
install -m 755 /tmp/sccache/sccache /usr/local/bin/
|
BIN
lastversion
BIN
lastversion
Binary file not shown.
11
makefile
Normal file
11
makefile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
CMD := cmake
|
||||||
|
SCRIPT := -P update.cmake
|
||||||
|
|
||||||
|
cmake:
|
||||||
|
$(CMD) -DTOOL=cmake -DREPO="Kitware/CMake" $(SCRIPT)
|
||||||
|
|
||||||
|
conan:
|
||||||
|
$(CMD) -DTOOL=conan -DREPO="conan-io/conan" $(SCRIPT)
|
||||||
|
|
||||||
|
sccache:
|
||||||
|
$(CMD) -DTOOL=sccache -DREPO="mozilla/sccache" $(SCRIPT)
|
5
templates/install-cmake.sh.in
Normal file
5
templates/install-cmake.sh.in
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
wget "https://github.com/Kitware/CMake/releases/download/v@VERSION@/cmake-@VERSION@-Linux-x86_64.sh" -nv -O /tmp/cmake.sh
|
||||||
|
sh /tmp/cmake.sh --exclude-subdir --prefix=/usr/local
|
5
templates/install-conan.sh.in
Normal file
5
templates/install-conan.sh.in
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
wget "https://dl.bintray.com/conan/installers/conan-ubuntu-64_@VERSION_UNDERSCORE@.deb" -nv -O /tmp/conan.deb
|
||||||
|
dpkg -i /tmp/conan.deb
|
7
templates/install-sccache.sh.in
Normal file
7
templates/install-sccache.sh.in
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
mkdir -p /tmp/sccache
|
||||||
|
wget "https://github.com/mozilla/sccache/releases/download/@VERSION@/sccache-@VERSION@-x86_64-unknown-linux-musl.tar.gz" -nv -O /tmp/sccache.tar.gz
|
||||||
|
tar xvzf /tmp/sccache.tar.gz --strip 1 -C /tmp/sccache
|
||||||
|
install -m 755 /tmp/sccache/sccache /usr/local/bin/
|
11
update.cmake
Normal file
11
update.cmake
Normal 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)
|
Loading…
x
Reference in New Issue
Block a user