Scripts to easily apply and remove github Pull Requests

This commit is contained in:
Tony Murray
2017-02-15 14:48:56 -06:00
parent b4da5de452
commit 62c49fedf7
2 changed files with 38 additions and 0 deletions

10
scripts/github-apply Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
LIBRENMS_DIR=`dirname "$(readlink -f "$0/..")"`
cd $LIBRENMS_DIR
if [ -z "$1" ]; then
echo "You must specify a PR number to apply a patch"
else
curl https://patch-diff.githubusercontent.com/raw/librenms/librenms/pull/${1}.patch | git apply -v ${2}
fi