-
Notifications
You must be signed in to change notification settings - Fork 2
/
hand_editions.sh
executable file
·50 lines (37 loc) · 1.18 KB
/
hand_editions.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /bin/sh
#---------------
updateCopyrightDate () {
dir=${here}
instring='Copyright (C) 1997-2010'
outstring='Copyright (C) 1997-2013'
#tmpfile='/tmp/tmp_updatecopyright.txt'
echo "In $dir"
echo "Changing $instring -> $outstring"
inlist=`find $dir -type f | grep -v \\.svn | grep -v java | grep -v cxx | grep -vi bk | grep -v $0 | xargs grep "$instring" | awk -F: '{print $1}'`
for file in $inlist ; do
ls -l $file
grep "$instring" $file
sed -i "s|$instring|$outstring|" ${file}
grep "$outstring" $file
done
}
#---------------
updateHEALPixWebSite () {
dir=${here}
instring='healpix.jpl.nasa.gov'
outstring='healpix.sourceforge.net'
#tmpfile='/tmp/tmp_updatecopyright.txt'
echo "In $dir"
echo "Changing $instring -> $outstring"
inlist=`find $dir -type f | grep -v \\.svn | grep -v java | grep -v cxx | grep -vi bk |grep -v $0 | xargs grep "$instring" | awk -F: '{print $1}'`
for file in $inlist ; do
ls -l $file
grep "$instring" $file
sed -i "s|$instring|$outstring|" ${file}
grep "$outstring" $file
done
}
#---------------
updateCopyrightDate
updateHEALPixWebSite
exit