librenms-librenms/scripts/github-apply
Tony Murray 676e5563b9 Only allow integers for input to github-apply
Remove some unneded code from github-remove
2017-02-17 21:49:29 -06:00

10 lines
283 B
Bash
Executable File

#!/bin/sh
LIBRENMS_DIR=`dirname "$(readlink -f "$0/..")"`
cd $LIBRENMS_DIR
case $1 in
''|*[!0-9]*) echo "You must specify a PR number to apply a patch" ;;
*) curl -s https://patch-diff.githubusercontent.com/raw/librenms/librenms/pull/${1}.patch | git apply -v ${2} ;;
esac