-
Notifications
You must be signed in to change notification settings - Fork 1
/
update-diffs.sh
executable file
·49 lines (40 loc) · 1010 Bytes
/
update-diffs.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
49
#!/bin/bash
source conf-names.sh
X=$RECDEVEL
Y=$RECIVORY
while getopts ":cp:" opt; do
case $opt in
c)
X=$DEVEL
Y=$IVORY
;;
p)
RECPKGS=$OPTARG;
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
echo "Option -$OPTARG requires an argument." >&2
exit 1
;;
esac
done
if [[ $X == $DEVEL ]]; then
source svn-cleanup.sh $X
source svn-cleanup.sh $Y
else
rm -r $X/*
for file in `ls $DEVEL/src/library/Recommended/*.tar.gz`; do
tar -xf $file -C $X
done
fi;
if [[ $X == $DEVEL ]]; then
LC_ALL=C diff -rEZbwB '--exclude=*.[lo,d,pdf,mo,po,tgz,gz,save]*' '--exclude=MD5' '--exclude=Makefile*' '--exclude=all.R' '--exclude=ChangeLog' $X $Y &> $Y/ChangeLog
else
for pkg in $RECPKGS; do
echo " Package" $pkg "..."
LC_ALL=C diff -rEZbwB '--exclude=*.[lo,d,pdf,mo,po,tgz,gz,save]*' '--exclude=MD5' '--exclude=Makefile*' '--exclude=all.R' '--exclude=Changes' $X/$pkg $Y/$pkg &> $Y/$pkg/Changes
done;
fi;