mirror of https://github.com/pwndbg/pwndbg.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
832 B
Bash
36 lines
832 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
source "$(dirname "$0")/common.sh"
|
|
|
|
OLD_VER="$1"
|
|
NEW_VER="$2"
|
|
|
|
portable_sed_replace() {
|
|
local arg1="$1"
|
|
local arg2="$2"
|
|
shift 2
|
|
local files=("$@")
|
|
|
|
if sed --version 2> /dev/null | grep -q "GNU"; then
|
|
for file in "${files[@]}"; do
|
|
sed -i "s@$arg1@$arg2@g" "$file"
|
|
done
|
|
else
|
|
for file in "${files[@]}"; do
|
|
sed -i '' "s@$arg1@$arg2@g" "$file"
|
|
done
|
|
fi
|
|
}
|
|
|
|
# Replace version in all places
|
|
portable_sed_replace $OLD_VER $NEW_VER ./pyproject.toml
|
|
portable_sed_replace $OLD_VER $NEW_VER ./pwndbg/lib/version.py
|
|
portable_sed_replace $OLD_VER $NEW_VER ./README.md
|
|
portable_sed_replace $OLD_VER $NEW_VER ./docs/setup.md
|
|
portable_sed_replace $OLD_VER $NEW_VER ./docs/install.sh
|
|
|
|
# Rebuild uv.lock file after version change
|
|
$UV lock
|