Add drone-ci lint and deployment test
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7446f7606a
commit
3ea2edb740
21
.drone.yml
Normal file
21
.drone.yml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
typo: docker
|
||||
|
||||
steps:
|
||||
- name: shellcheck
|
||||
image: koalaman/shellcheck-alpine:latest
|
||||
|
||||
commands:
|
||||
- grep -rl '^#!/.*sh' * | xargs -n1 shellcheck
|
||||
|
||||
- name: deploy
|
||||
image: debian:buster
|
||||
|
||||
environment:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
commands:
|
||||
- apt-get -qq update && apt-get install -yf wget
|
||||
- bash mib-downloader.sh PowerNet-MIB
|
||||
- bash mib-downloader.sh IDRAC-MIB
|
@ -1,3 +1,9 @@
|
||||
# MIB Downloader
|
||||
|
||||
[![Build Status](https://drone.binary-kitchen.de/api/badges/sprinterfreak/mibs-downloader/status.svg?ref=refs/heads/master)](https://drone.binary-kitchen.de/sprinterfreak/mibs-downloader)
|
||||
|
||||
Search and dowload mibs from different sources
|
||||
|
||||
## Important MIBs
|
||||
|
||||
This is a set of important mibs
|
||||
|
@ -6,23 +6,23 @@ if [ -z "$1" ]; then
|
||||
fi
|
||||
|
||||
gc(){
|
||||
test -f $F && rm $F
|
||||
test -f "$F" && rm "$F"
|
||||
}
|
||||
trap gc EXIT
|
||||
|
||||
F=$(mktemp)
|
||||
|
||||
if wget -qO $F "http://www.circitor.fr/Mibs/Mib/${1:0:1}/$1.mib"; then
|
||||
if ! grep "<html" $F >/dev/null; then
|
||||
mv $F mibs/$1.mib
|
||||
if wget -qO "$F" "http://www.circitor.fr/Mibs/Mib/${1:0:1}/$1.mib"; then
|
||||
if ! grep "<html" "$F" >/dev/null; then
|
||||
mv "$F" "mibs/$1.mib"
|
||||
exit 0
|
||||
fi
|
||||
echo "MIB not found on circitor.fr" >&2
|
||||
fi
|
||||
|
||||
if wget -qO $F "https://iphostmonitor.com/mib/$1.html"; then
|
||||
if ! grep "<html" $F >/dev/null; then
|
||||
mv $F mibs/$1.mib
|
||||
if wget -qO "$F" "https://iphostmonitor.com/mib/$1.html"; then
|
||||
if ! grep "<html" "$F" >/dev/null; then
|
||||
mv "$F" "mibs/$1.mib"
|
||||
exit 0
|
||||
fi
|
||||
echo "MIB not found on iphostmonitor.com" >&2
|
||||
|
Loading…
Reference in New Issue
Block a user