parse latest version of qemu & gdb from their git repo

This commit is contained in:
Michael Rodler 2017-11-13 16:42:22 +01:00 committed by Yan
parent 36c7481983
commit f986af55fb
2 changed files with 22 additions and 2 deletions

View file

@ -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"

View file

@ -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