3 # GCC snapshot generation script.
5 # Originally written by Jeff Law <law@redhat.com>. Most minor modifications
6 # by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>.
8 # TODO: Include the FAQ and installation instructions in the snapshot
10 set SCRIPTDIR
=/home
/law
/gcc
11 set STATEDIR
=/home
/law
14 set path
= (/usr
/local
/bin
$path)
16 # Get somewhere useful with a lot of disk space.
19 # Get date of current and previous snapshot.
20 set date=`date +%Y%m%d`
21 set last_date
=`cat $STATEDIR/.snapshot_date`
22 set snapdir
=`date +%Y-%m-%d`
24 # Update and uncomment the following lines to run a particular snapshot pair.
26 #set last_date=19990920
28 # We run this on the cvs server itself so we can get at
29 # the cvs files quickly.
30 setenv CVSROOT
/cvs
/gcc
32 # Get into a temporary directory so as not to be confused by
33 # any existing CVS administration files.
38 # Tag the current sources for the snapshot
39 cvs
-z 9 -Q rtag
-F gcc_ss_
$date gcc
41 # Get an exported copy of the last gcc-core module snapshot
42 # arggh gcc-core doesn't work right now, so check out the whole
43 # thing and remove bits we don't need.
44 #zcat ~ftp/pub/gcc/snapshots/1998-05-31/gcc-$last_date.tar.gz | tar xf -
45 cvs
-z 9 -Q export -rgcc_ss_$last_date gcc
47 find .
-type f
-print |
sort > ..
/files_
$last_date
48 ~law
/bin
/brik
-Gb -f ..
/files_
$last_date > ..
/.brik_
$last_date
49 cp ..
/.brik_
$last_date .
/.brik
51 rm -rf gcc
/{libio
,libstdc
++,libstdc
++-v3,libf2c
,libchill
,libobjc
}
52 rm -rf gcc
/{boehm-gc
,fastjar
,libffi
,libjava
,zlib
}
53 rm -rf gcc
/gcc
/{testsuite
,f
,objc
,cp,java
,ch
}
56 # Similarly for today's gcc-core module snapshot
57 cvs
-z 9 -Q export -rgcc_ss_$date gcc
59 contrib
/gcc_update
--touch
60 find .
-type f
-print |
sort > ..
/files_
$date
61 ~law
/bin
/brik
-Gb -f ..
/files_
$date > ..
/.brik_
$date
62 cp ..
/.brik_
$date .
/.brik
64 rm -rf gcc
/{libio
,libstdc
++,libstdc
++-v3,libf2c
,libchill
,libobjc
}
65 rm -rf gcc
/{boehm-gc
,fastjar
,libffi
,libjava
,zlib
}
66 rm -rf gcc
/gcc
/{testsuite
,f
,objc
,cp,java
,ch
}
70 rm -rf files_
$last_date
73 diff -Nrc3p gcc-
$last_date gcc-
$date > gcc-core-
$last_date-$date.
diff
75 # Make the tarball for the core
76 tar cf
- gcc-
$date |
gzip --best > gcc-core-
$date.
tar.gz
78 # Remove the core gunk and get the whole thing back.
81 #zcat ~ftp/pub/gcc/snapshots/1998-05-31/gcc-$last_date.tar.gz | tar xf -
82 cvs
-z 9 -Q export -rgcc_ss_$last_date gcc
84 cp .brik_
$last_date gcc-
$last_date/.brik
85 cvs
-z 9 -Q export -rgcc_ss_$date gcc
87 contrib
/gcc_update
--touch
90 cp .brik_
$date gcc-
$date/.brik
92 # We don't need this anymore.
94 rm -rf .brik_
$last_date
96 # Now make diffs for g77, g77-testsuite chill, java objc, g++, g++-testsuite,
97 # testsuite, then the whole bloody thing.
98 diff -Nrc3p gcc-
$last_date/gcc
/f gcc-
$date/gcc
/f
> gcc-g77-
$last_date-$date.
diff
99 diff -Nrc3p gcc-
$last_date/libf2c gcc-
$date/libf2c
>> gcc-g77-
$last_date-$date.
diff
101 diff -Nrc3p gcc-
$last_date/gcc
/testsuite
/g77.f-torture gcc-
$date/gcc
/testsuite
/g77.f-torture
> gcc-g77-testsuite-
$last_date-$date.
diff
103 diff -Nrc3p gcc-
$last_date/gcc
/objc gcc-
$date/gcc
/objc
> gcc-objc-
$last_date-$date.
diff
104 diff -Nrc3p gcc-
$last_date/libobjc gcc-
$date/libobjc
>> gcc-objc-
$last_date-$date.
diff
106 diff -Nrc3p gcc-
$last_date/gcc
/java gcc-
$date/gcc
/java
> gcc-java-
$last_date-$date.
diff
107 diff -Nrc3p gcc-
$last_date/boehm-gc gcc-
$date/boehm-gc
>> gcc-java-
$last_date-$date.
diff
108 diff -Nrc3p gcc-
$last_date/fastjar gcc-
$date/fastjar
>> gcc-java-
$last_date-$date.
diff
109 diff -Nrc3p gcc-
$last_date/libffi gcc-
$date/libffi
>> gcc-java-
$last_date-$date.
diff
110 diff -Nrc3p gcc-
$last_date/libjava gcc-
$date/libjava
>> gcc-java-
$last_date-$date.
diff
111 diff -Nrc3p gcc-
$last_date/zlib gcc-
$date/zlib
>> gcc-java-
$last_date-$date.
diff
113 diff -Nrc3p gcc-
$last_date/gcc
/ch gcc-
$date/gcc
/ch
> gcc-chill-
$last_date-$date.
diff
114 diff -Nrc3p gcc-
$last_date/libchill gcc-
$date/libchill
>> gcc-chill-
$last_date-$date.
diff
116 diff -Nrc3p gcc-
$last_date/gcc
/cp gcc-
$date/gcc
/cp > gcc-g
++-$last_date-$date.
diff
117 diff -Nrc3p gcc-
$last_date/libio gcc-
$date/libio
>> gcc-g
++-$last_date-$date.
diff
118 diff -Nrc3p gcc-
$last_date/libstdc
++ gcc-
$date/libstdc
++ >> gcc-g
++-$last_date-$date.
diff
119 diff -Nrc3p gcc-
$last_date/libstdc
++-v3 gcc-
$date/libstdc
++-v3 >> gcc-g
++-$last_date-$date.
diff
121 diff -Nrc3p gcc-
$last_date/gcc
/testsuite
/g
++.old-deja gcc-
$date/gcc
/testsuite
/g
++.old-deja
> gcc-g
++-tests-$last_date-$date.
diff
123 diff -Nrc3p gcc-
$last_date/gcc
/testsuite gcc-
$date/gcc
/testsuite
> gcc-tests-
$last_date-$date.
diff
125 diff -Nrc3p gcc-
$last_date gcc-
$date > gcc-
$last_date-$date.
diff
128 # Apply the patches to the old snapshot and run another diff to see if anything
131 patch -p1 -E -s < ..
/gcc-
$last_date-$date.
diff
132 find .
-name \
*.orig
-print |
xargs rm -rf
134 find .
-name \
*.rej
> $STATEDIR/CHECKME
135 ~law
/bin
/brik
-C .brik
>> $STATEDIR/CHECKME
137 diff -Nrc3p gcc-
$last_date gcc-
$date >> $STATEDIR/CHECKME
139 # Remove the old snapshot, we're done with it.
140 #rm -rf gcc-$last_date
143 # Touch all the machine generated files so people don't need gperf, bison and friends.
145 tar cf
- gcc-
$date/.brik gcc-
$date/gcc
/f gcc-
$date/libf2c |
gzip --best > gcc-g77-
$date.
tar.gz
146 tar cf
- gcc-
$date/.brik gcc-
$date/gcc
/testsuite
/g77.f-torture |
gzip --best > gcc-g77-testsuite-
$date.
tar.gz
147 tar cf
- gcc-
$date/.brik gcc-
$date/gcc
/objc gcc-
$date/libobjc |
gzip --best > gcc-objc-
$date.
tar.gz
148 tar cf
- gcc-
$date/.brik gcc-
$date/gcc
/java gcc-
$date/{boehm-gc
,fastjar
,libffi
,libjava
,zlib
} |
gzip --best > gcc-java-
$date.
tar.gz
149 tar cf
- gcc-
$date/.brik gcc-
$date/gcc
/ch gcc-
$date/libchill |
gzip --best > gcc-chill-
$date.
tar.gz
150 tar cf
- gcc-
$date/.brik gcc-
$date/gcc
/cp gcc-
$date/{libio
,libstdc
++,libstdc
++-v3} |
gzip --best > gcc-g
++-$date.
tar.gz
151 tar cf
- gcc-
$date/.brik gcc-
$date/gcc
/testsuite
/g
++.old-deja |
gzip --best > gcc-g
++-tests-$date.
tar.gz
152 tar cf
- gcc-
$date/.brik gcc-
$date/gcc
/testsuite |
gzip --best > gcc-tests-
$date.
tar.gz
153 tar cf
- gcc-
$date |
gzip --best > gcc-
$date.
tar.gz
155 # Compress the diff files.
158 # Copy them to the FTP server XXX
159 mkdir ~ftp
/pub
/gcc
/snapshots
/$snapdir
160 chmod 775 ~ftp
/pub
/gcc
/snapshots
/$snapdir
161 cp *.gz ~ftp
/pub
/gcc
/snapshots
/$snapdir
163 echo $tst `sum $tst` >>~ftp
/pub
/gcc
/snapshots
/$snapdir/CHECKSUMS
166 # Update links on the ftp server
167 $SCRIPTDIR/update_links
$date
169 # Get back to the toplevel directory before we update the date.
172 # Note that we made a snapshot today
173 mv .snapshot_date .prev_snapshot_date
174 echo $date > .snapshot_date
176 $SCRIPTDIR/update_tags
179 mail -s "gcc-ss-$date is now available" gcc@gcc.gnu.org
< ~ftp
/pub
/gcc
/snapshots
/README
180 mail -s "snapshot:CHECKME" law@cygnus.com
< $STATEDIR/CHECKME