termux_devenv/files/pullrequest.sh
Peter Surda 2323619b00
Some checks failed
buildbot/travis_bionic Build done.
Update termux and add pullrequest script
2021-08-03 14:19:59 +08:00

15 lines
357 B
Bash
Executable File

#!/bin/bash
if [ -z "${1}" ]; then
echo "No PR# specified, here is a list:"
curl -s https://api.github.com/repos/Bitmessage/PyBitmessage/pulls -s | jq '.[] | .number, .title' | paste - -
exit 1
fi
echo "Checking out PR ${1}"
curbranch=$(git status|head -1|cut -d\ -f3-)
git pull --all
git fetch -u origin pull/"$1"/head:"$1"
git checkout $1