librenms-librenms/scripts/github-apply

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
306 B
Plaintext
Raw Normal View History

#!/bin/sh
2021-03-28 17:47:21 +02:00
LIBRENMS_DIR=$(dirname "$(readlink -f "$0/..")")
cd "$LIBRENMS_DIR" || exit
case $1 in
''|*[!0-9]*) echo "You must specify a PR number to apply a patch" ;;
2021-03-28 17:47:21 +02:00
*) curl -s https://patch-diff.githubusercontent.com/raw/librenms/librenms/pull/"${1}".diff | git apply --exclude=*.png -v ;;
esac