mirror of https://github.com/pwndbg/pwndbg
Install shfmt on Ubuntu 22.04, otherwise skip running linter (#1323)
This commit is contained in:
parent
aaf9ad2151
commit
7efaa33b0c
|
@ -22,7 +22,6 @@ jobs:
|
|||
run: |
|
||||
./setup.sh --user
|
||||
./setup-dev.sh --user
|
||||
sudo snap install shfmt
|
||||
|
||||
- name: Run linters
|
||||
run: |
|
||||
|
|
8
lint.sh
8
lint.sh
|
@ -49,8 +49,12 @@ fi
|
|||
|
||||
flake8 --show-source ${LINT_FILES}
|
||||
|
||||
# Indents are four spaces, binary ops can start a line, and indent switch cases
|
||||
shfmt -i 4 -bn -ci -d .
|
||||
if [ -x "$(command -v shfmt)" ]; then
|
||||
# Indents are four spaces, binary ops can start a line, and indent switch cases
|
||||
shfmt -i 4 -bn -ci -d .
|
||||
else
|
||||
echo "shfmt not installed, skipping"
|
||||
fi
|
||||
|
||||
# Checking minimum python version
|
||||
vermin -q -t=3.6 --violations ./pwndbg/
|
||||
|
|
16
setup-dev.sh
16
setup-dev.sh
|
@ -34,6 +34,11 @@ install_apt() {
|
|||
curl \
|
||||
build-essential \
|
||||
gdb
|
||||
|
||||
if [[ "$1" == "22.04" ]]; then
|
||||
sudo apt install shfmt
|
||||
fi
|
||||
|
||||
test -f /usr/bin/go || sudo apt-ge\t install -y golang
|
||||
|
||||
# Install zig to current directory
|
||||
|
@ -57,11 +62,18 @@ install_apt() {
|
|||
}
|
||||
|
||||
if linux; then
|
||||
distro=$(grep "^ID=" /etc/os-release | cut -d'=' -f2 | sed -e 's/"//g')
|
||||
distro=$(
|
||||
. /etc/os-release
|
||||
echo ${ID}
|
||||
)
|
||||
|
||||
case $distro in
|
||||
"ubuntu")
|
||||
install_apt
|
||||
ubuntu_version=$(
|
||||
. /etc/os-release
|
||||
echo ${VERSION_ID}
|
||||
)
|
||||
install_apt $ubuntu_version
|
||||
;;
|
||||
*) # we can add more install command for each distros.
|
||||
echo "\"$distro\" is not supported distro. Will search for 'apt' or 'dnf' package managers."
|
||||
|
|
Loading…
Reference in New Issue