]> Dogcows Code - chaz/tar/blob - bootstrap
Initial revision
[chaz/tar] / bootstrap
1 #! /bin/sh
2
3 # Bootstrap 'tar' from CVS.
4
5 # Copyright (C) 2003 Free Software Foundation, Inc.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 # 02111-1307, USA.
21
22 # Written by Paul Eggert.
23
24
25 # Parse options.
26
27 for option; do
28 case $option in
29 --help)
30 echo "$0: usage: $0 [--gnulib-srcdir=DIR]"
31 exit;;
32 --gnulib-srcdir=*)
33 GNULIB_SRCDIR=`expr "$1" : '--gnulib-srcdir=\(.*\)'`;;
34 *)
35 echo >&2 "$0: $option: unknown option"
36 exit 1;;
37 esac
38 done
39
40
41 echo "$0: Bootstrapping CVS tar..."
42
43
44 # Get gnulib files.
45
46 echo "$0: getting gnulib files..."
47
48 case ${GNULIB_SRCDIR--} in
49 -)
50 if [ ! -d gnulib ]; then
51 trap exit 1 2 13 15
52 trap 'rm -fr gnulib; exit 1' 0
53 cvs -q -d savannah.gnu.org:/cvsroot/gnulib co gnulib || exit
54 trap 0
55 fi
56 GNULIB_SRCDIR=gnulib
57 esac
58
59 <$GNULIB_SRCDIR/gnulib-tool || exit
60
61 gnulib_modules='
62 alloca
63 argmatch
64 backupfile
65 dirname
66 error
67 exclude
68 fileblocks
69 fnmatch
70 ftruncate
71 full-write
72 getdate
73 getline
74 getopt
75 gettext
76 hash
77 human
78 lchown
79 memset
80 modechange
81 safe-read
82 quote
83 quotearg
84 rmdir
85 save-cwd
86 savedir
87 stdbool
88 strtol
89 strtoul
90 unlocked-io
91 utime
92 xalloc
93 xgetcwd
94 xstrtoumax
95 '
96
97 previous_gnulib_modules=
98 while [ "$gnulib_modules" != "$previous_gnulib_modules" ]; do
99 previous_gnulib_modules=$gnulib_modules
100 gnulib_modules=`
101 (echo "$gnulib_modules"
102 for gnulib_module in $gnulib_modules; do
103 $GNULIB_SRCDIR/gnulib-tool --extract-dependencies $gnulib_module
104 done) | sort -u
105 `
106 done
107
108 gnulib_files=`
109 (for gnulib_module in $gnulib_modules; do
110 $GNULIB_SRCDIR/gnulib-tool --extract-filelist $gnulib_module
111 done) | sort -u
112 `
113
114 gnulib_dirs=`echo "$gnulib_files" | sed 's,/[^/]*$,,' | sort -u`
115 mkdir -p $gnulib_dirs || exit
116
117 for gnulib_file in $gnulib_files; do
118 dest=$gnulib_file
119
120 case $gnulib_file in
121 m4/codeset.m4) continue;;
122 m4/glibc21.m4) continue;;
123 m4/intdiv0.m4) continue;;
124 m4/inttypes_h.m4) continue;;
125 m4/inttypes.m4) continue;;
126 m4/inttypes-pri.m4) continue;;
127 m4/isc-posix.m4) continue;;
128 m4/lcmessage.m4) continue;;
129 m4/onceonly_2_57.m4) dest=m4/onceonly.m4;;
130 esac
131
132 rm -f $dest &&
133 echo "$0: Copying file $GNULIB_SRCDIR/$gnulib_file" &&
134 cp -p $GNULIB_SRCDIR/$gnulib_file $dest || exit
135 done
136
137
138 # Get translations.
139
140 echo "$0: getting translations into po..."
141 (cd po &&
142 rm -f dummy `ls | sed -n '/\.gmo$/p; /^en_GB\.po$/d; /\.po/p'` &&
143 wget -nv -nd -r -l 1 -A .po -C off \
144 http://www.iro.umontreal.ca/contrib/po/maint/tar/ &&
145 ls *.po | sed 's/\.po$//' >LINGUAS
146 ) || exit
147
148
149 # Reconfigure, getting other files.
150
151 echo "$0: autoreconf --verbose --install --force ..."
152 autoreconf --verbose --install --force
153
154
155 echo "$0: done. Now you can run './configure'."
This page took 0.039062 seconds and 5 git commands to generate.