[16191] | 1 | #! /bin/sh |
---|
| 2 | # |
---|
| 3 | # (hacked from egcs_update and pikt_update) |
---|
| 4 | # |
---|
| 5 | # Update a local CVS tree from the NTP repository, with an emphasis |
---|
| 6 | # on treating generated files correctly, so that autoconf, bison et |
---|
| 7 | # al are not required for the ``end'' user. |
---|
| 8 | # |
---|
| 9 | # By default all command-line options are passed to `cvs update` in |
---|
| 10 | # addition to $UPDATE_OPTIONS (defined below). If the first parameter |
---|
| 11 | # reads --nostdflags, $UPDATE_OPTIONS as well as this parameter itself |
---|
| 12 | # are omitted. |
---|
| 13 | # |
---|
| 14 | # Examples: |
---|
| 15 | # |
---|
| 16 | # ntp_update -r ntp_latest_snapshot |
---|
| 17 | # ntp_update -A |
---|
| 18 | # ntp_update --nostdflags -P -r ntp_1_1_branch foo/bar |
---|
| 19 | # |
---|
| 20 | # |
---|
| 21 | # (C) 1998 Free Software Foundation |
---|
| 22 | # Originally by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>, August 1998. |
---|
| 23 | # |
---|
| 24 | # This script is Free Software, and it can be copied, distributed and |
---|
| 25 | # modified as defined in the GNU General Public License. A copy of |
---|
| 26 | # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html |
---|
| 27 | |
---|
| 28 | |
---|
| 29 | UPDATE_OPTIONS="-P -d" |
---|
| 30 | # Add -d to create any directories that exist in the repository but not |
---|
| 31 | # locally. |
---|
| 32 | # Add -A to reset any sticky tags, dates, or `-k' options. |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | echo "Current directory is `pwd`." |
---|
| 36 | |
---|
| 37 | # First of all, check whether this indeed looks like a local CVS of ntp. |
---|
| 38 | if [ ! -d CVS ] || [ ! -f ntpd/ntpd.c ]; then |
---|
| 39 | echo "This does not seem to be an ntp CVS tree!" |
---|
| 40 | exit |
---|
| 41 | fi |
---|
| 42 | |
---|
| 43 | # Check command-line options |
---|
| 44 | |
---|
| 45 | if [ x"${1}"x = x"--nostdflags"x ]; then |
---|
| 46 | shift |
---|
| 47 | else |
---|
| 48 | set -- $UPDATE_OPTIONS ${1+"$@"} |
---|
| 49 | fi |
---|
| 50 | |
---|
| 51 | echo "Pass 1: Updating autoconf and bison source files" |
---|
| 52 | find . -name configure.in -o -name '*.y' -o -name copyright.htm | grep -v '^\./A\.'| xargs cvs -q update |
---|
| 53 | |
---|
| 54 | echo "Pass 2: Updating full tree" |
---|
| 55 | cvs -q update ${1+"$@"} |
---|
| 56 | |
---|
| 57 | echo "Pass 3: Fixing local tree" |
---|
| 58 | touch `find . -name aclocal.m4 -print` |
---|
| 59 | touch `find . -name configure -print` |
---|
| 60 | touch `find . -name Makefile.in -print` |
---|
| 61 | #touch `find texinfo -name \*.pot -print` |
---|
| 62 | #touch `find texinfo -name \*.gmo -print` |
---|
| 63 | # The following code should also touch the generated lex/yacc/rpc files |
---|
| 64 | for f in \ |
---|
[17259] | 65 | stamp-h.in \ |
---|
| 66 | COPYRIGHT |
---|
[16191] | 67 | do |
---|
| 68 | touch $f |
---|
| 69 | done |
---|