mirror of
https://github.com/radareorg/r2xsql.git
synced 2026-11-09 04:29:35 -10:00
25 lines
869 B
Bash
25 lines
869 B
Bash
#!/usr/bin/env bash
|
|
# Test the public release through r2pm using radare2's official distribution.
|
|
set -euo pipefail
|
|
mkdir -p build-r2-runtime
|
|
base="https://github.com/radareorg/radare2/releases/download/${R2_REF}"
|
|
case "$RUNNER_OS" in
|
|
Linux)
|
|
curl -fsSL -o build-r2-runtime/radare2.deb "$base/radare2_${R2_REF}_amd64.deb"
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y ./build-r2-runtime/radare2.deb
|
|
;;
|
|
Windows)
|
|
curl -fsSL -o build-r2-runtime/radare2.zip "$base/radare2-${R2_REF}-w64.zip"
|
|
unzip -q build-r2-runtime/radare2.zip -d build-r2-runtime
|
|
r2=$(find "$PWD/build-r2-runtime" -name radare2.exe -type f -print -quit)
|
|
[[ -n "$r2" ]]
|
|
export PATH="$(dirname "$r2"):$PATH"
|
|
;;
|
|
*) echo "Unsupported runner: $RUNNER_OS" >&2; exit 1 ;;
|
|
esac
|
|
r2pm -U
|
|
r2pm -bi r2xsql
|
|
python3 tests/smoke.py "$(command -v radare2)"
|
|
r2pm -u r2xsql
|