Update github-apply (#14875)

This commit is contained in:
electrocret 2023-03-03 11:21:08 -06:00 committed by GitHub
parent de16bbdc49
commit 4446935901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,8 +2,11 @@
LIBRENMS_DIR=$(dirname "$(readlink -f "$0/..")")
cd "$LIBRENMS_DIR" || exit
for pr in "$@"
do
case $pr 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/"${pr}".diff | git apply --exclude=*.png -v ;;
esac
done
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}".diff | git apply --exclude=*.png -v ;;
esac