-
Notifications
You must be signed in to change notification settings - Fork 1
/
SETUP_MASTER_TREE
154 lines (152 loc) · 3.12 KB
/
SETUP_MASTER_TREE
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#!/bin/sh
exit 0; #modify this before running.
cat > tarlist.tmp <<EOF
libdwarf2002April28.tar.gz
libdwarf2002Oct23.tar.gz
libdwarf2002Nov22.tar.gz
libdwarf2003Apr06.tar.gz
libdwarf20031002.tar.gz
libdwarf20031006.tar.gz
libdwarf20031230.tar.gz
libdwarf20040102.tar.gz
libdwarf20040203.tar.gz
libdwarf20040315.tar.gz
libdwarf20040507.tar.gz
libdwarf20041011.tar.gz
libdwarf20041026.tar.gz
libdwarf20041027.tar.gz
libdwarf-20041122.tar.gz
libdwarf-20050216.tar.gz
libdwarf-20050318.tar.gz
libdwarf-20050503.tar.gz
libdwarf-20050714.tar.gz
libdwarf-20050722.tar.gz
libdwarf-20050801.tar.gz
libdwarf-20051003.tar.gz
libdwarf-20051024.tar.gz
libdwarf-20051108.tar.gz
libdwarf-20051201.tar.gz
libdwarf-20060224.tar.gz
libdwarf-20060308.tar.gz
libdwarf-20060317.tar.gz
libdwarf-20060323.tar.gz
libdwarf-20060327.tar.gz
libdwarf-20060418.tar.gz
libdwarf-20060419.tar.gz
libdwarf-20060421.tar.gz
libdwarf-20060428.tar.gz
libdwarf-20060612.tar.gz
libdwarf-20060614.tar.gz
libdwarf-20060925.tar.gz
libdwarf-20061108.tar.gz
libdwarf-20061206.tar.gz
EOF
#cat > tarlist.tmp <<EOF
#libdwarf2002April28.tar.gz
#libdwarf2002Oct23.tar.gz
#libdwarf-20061206.tar.gz
#EOF
rm -rf $dm
b=/home/davea/sgiweb3/pagedata
dw=/home/davea/dwarf
dwrepo=$dw/dwarf-repository
dwwork=$dw/dwarf-working
rm -rf $dwwork
rm -rf $dwrepo
mkdir $dwwork
first=y
checkout(){
s=`pwd`
cd $dwwork
echo checkout
svn checkout file://$dwrepo/trunk $dwwork/trunk
cd $s
}
update(){
s=`pwd`
cd $dwwork/trunk
svn update
cd $s
}
modify(){
origsrcname=$1
src=$dw/dwarf
msg=$2
s=`pwd`
cd $dwwork/trunk
svn update
cp -r $src/dwarfdump/* dwarfdump
cp -r $src/libdwarf/* libdwarf
find . -type f -exec chmod +w {} \;
l=`find . -type f -print | grep -v '\.svn'`
for i in $l
do
echo "svn add $i"
svn add $i
done
svn commit -m $msg
cd $s
}
while read linein
do
echo $linein
rm -rf dwarf
y=`echo $linein | awk -F . '{ print $1; }' `
echo $y
tar xzf $b/$linein
# Only newer ones actually have a - in the name.
t=`echo $y | awk -F - '{ print $2; }' `
to=`echo $y | cut -c 9- `
echo 'local variable to = ' $to
f=dwarf
if [ -d $f ]
then
echo found $f
else
f=$y
if [ -d $f ]
then
echo found $f
else
f="dwarf-$t"
echo try $t $f
if [ -d $f ]
then
echo found $f
else
f=dwarf$to
echo try $y $f
if [ -d $f ]
then
echo found $f
else
echo "cannot find dwarf expansion"
continue
fi
fi
fi
fi
echo $f
ls $f
if [ $f != "dwarf" ]
then
echo "switch name from $f to dwarf"
mv $f dwarf
fi
if [ $first = "y" ]
then
svnadmin create $dwrepo
svn import dwarf file://$dwrepo/trunk -m "$y"
first="n"
checkout
cd $dw
else
echo existing repository update `pwd`
update
modify $f $y
echo existing repository checkout done `pwd`
fi
echo rm -rf dwarf $y
rm -rf dwarf
rm -rf $y
done <tarlist.tmp