mirror of https://github.com/pwndbg/pwndbg
Add support for FreeBSD (#1832)
* Use /bin/sh instead of /bin/bash * Install the required freebsd packages and remove some bashisms * Reuse bash * Attempt to fix the linter * Fix the linter
This commit is contained in:
parent
04dea93798
commit
37fcc691b5
11
setup.sh
11
setup.sh
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
# If we are a root in a container and `sudo` doesn't exist
|
||||
|
@ -68,6 +68,11 @@ install_pacman() {
|
|||
fi
|
||||
}
|
||||
|
||||
install_freebsd() {
|
||||
sudo pkg install git gdb python py39-pip cmake gmake
|
||||
which rustc || sudo pkg install rust
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [--update]"
|
||||
echo " --update: Install/update dependencies without checking ~/.gdbinit"
|
||||
|
@ -138,6 +143,9 @@ if linux; then
|
|||
}
|
||||
fi
|
||||
;;
|
||||
"freebsd")
|
||||
install_freebsd
|
||||
;;
|
||||
*) # we can add more install command for each distros.
|
||||
echo "\"$distro\" is not supported distro. Will search for 'apt' or 'dnf' package managers."
|
||||
if hash apt; then
|
||||
|
@ -163,6 +171,7 @@ git submodule update --init --recursive
|
|||
# Find the Python version used by GDB.
|
||||
PYVER=$(gdb -batch -q --nx -ex 'pi import platform; print(".".join(platform.python_version_tuple()[:2]))')
|
||||
PYTHON+=$(gdb -batch -q --nx -ex 'pi import sys; print(sys.executable)')
|
||||
|
||||
if ! osx; then
|
||||
PYTHON+="${PYVER}"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue