File: update-files.sh

package info (click to toggle)
nagios-plugins-contrib 21.20170222
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,764 kB
  • ctags: 1,895
  • sloc: perl: 36,233; sh: 11,977; python: 2,435; php: 593; lex: 582; makefile: 456; ansic: 281; ruby: 149; awk: 81
file content (13 lines) | stat: -rwxr-xr-x 350 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

# update all files from the dsa nagios git
find checks sbin share etc -type f | while read i; do
    tmp=`mktemp`
    if wget -O "${tmp}" "http://anonscm.debian.org/gitweb/?p=mirror/dsa-nagios.git;a=blob_plain;f=dsa-nagios-checks/${i};hb=HEAD"; then
        mv "${tmp}" "$i"
    else
        rm -f "${tmp}"
    fi
done

chmod 755 sbin/*