Only allow integers for input to github-apply

Remove some unneded code from github-remove
This commit is contained in:
Tony Murray
2017-02-17 21:49:29 -06:00
parent 6b33bdc949
commit 676e5563b9
2 changed files with 4 additions and 11 deletions

View File

@@ -3,8 +3,7 @@
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
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