mirror of
https://github.com/zardus/ctf-tools
synced 2024-12-12 14:02:33 +00:00
parse latest version of qemu & gdb from their git repo
This commit is contained in:
parent
36c7481983
commit
f986af55fb
2 changed files with 22 additions and 2 deletions
13
gdb/install
13
gdb/install
|
@ -1,7 +1,18 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
|
|
||||||
VERSION=8.0.1
|
find_latest_gdb_version() {
|
||||||
|
git ls-remote --tags git://sourceware.org/git/binutils-gdb.git \
|
||||||
|
| grep -v users \
|
||||||
|
| grep -v '{}' \
|
||||||
|
| grep -oh 'gdb-[0-9]\{1,2\}.[0-9]\{1,2\}.[0-9]\{1,2\}\(\.[0-9]\{1,2\}\)\?-release' \
|
||||||
|
| sort --version-sort -r \
|
||||||
|
| sed 's/gdb-//g' \
|
||||||
|
| sed 's/-release//g' \
|
||||||
|
| head -n 1
|
||||||
|
}
|
||||||
|
|
||||||
|
VERSION=$(find_latest_gdb_version)
|
||||||
|
|
||||||
curl "https://ftp.gnu.org/gnu/gdb/gdb-$VERSION.tar.gz" | tar xz
|
curl "https://ftp.gnu.org/gnu/gdb/gdb-$VERSION.tar.gz" | tar xz
|
||||||
cd "gdb-$VERSION"
|
cd "gdb-$VERSION"
|
||||||
|
|
11
qemu/install
11
qemu/install
|
@ -1,6 +1,15 @@
|
||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
VERSION=v2.10.0
|
find_latest_qemu_version() {
|
||||||
|
git ls-remote --tags git://git.qemu.org/qemu.git \
|
||||||
|
| grep -v '\-rc' \
|
||||||
|
| grep -oh 'v[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}\(\.[0-9]\{0,2\}\)\?' \
|
||||||
|
| sort --version-sort -r \
|
||||||
|
| head -n 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#VERSION=v2.10.1
|
||||||
|
VERSION=$(find_latest_qemu_version)
|
||||||
git clone --depth=1 -b "$VERSION" git://git.qemu-project.org/qemu.git
|
git clone --depth=1 -b "$VERSION" git://git.qemu-project.org/qemu.git
|
||||||
|
|
||||||
source ctf-tools-venv-activate
|
source ctf-tools-venv-activate
|
||||||
|
|
Loading…
Reference in a new issue