File: update-scripts

package info (click to toggle)
irssi-scripts 20070925
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,708 kB
  • ctags: 2,415
  • sloc: perl: 54,737; makefile: 43; sh: 20
file content (18 lines) | stat: -rwxr-xr-x 374 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

while read tok1 tok2 ; do
	if [ "$tok1" = script ] ; then
		script=$tok2
		echo "$script ------------------"
	fi

	if [ "$tok1" = "url" ] ; then
		wget -q -O scripts/$script.new "$tok2"
		if diff -up scripts/$script scripts/$script.new ; then
			echo "$script is up to date"
			rm scripts/$script.new
		else
			echo "$script needs updating"
		fi
	fi
done < INDEX