-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap
executable file
·74 lines (66 loc) · 1.85 KB
/
bootstrap
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
#! /bin/sh
# Copyright (C) 2011-2017 Free Software Foundation, Inc.
#
# GDBM is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GDBM is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GDBM. If not, see <http://www.gnu.org/licenses/>. */
force=0
refdir=po/.reference
get_po() {
test -d $refdir || mkdir $refdir
# Get PO files.
rsync --delete -Lrtvz translationproject.org::tp/latest/gdbm/ $refdir
langs=`cd $refdir && ls *.po | sed 's/\.po$//' | sort`
if test "$langs" != '*'; then
for lang in $langs
do
if test -f po/$lang.po && cmp po/$lang.po $refdir/$lang.po >/dev/null
then
:
else
cp $refdir/$lang.po po
fi
done
fi
# Create LINGUAS
(echo "# This file is generated automatically; don't edit"
ls po/*.po 2>/dev/null | sed 's^.*/^^;s/\.po$//' | sort) > po/LINGUAS
}
################
if test $# -eq 0; then
:;
elif test $# -eq 1; then
case $1 in
--force) force=1;;
--help|-h)
cat <<EOT
usage: bootstrap [--force]
bootstraps GDBM package
EOT
;;
*) echo >&2 "$0: unrecognized option"
exit 1;;
esac
else
echo >&2 "$0: too many arguments"
exit 1
fi
if ! test -f README-hacking && test $force -eq 0; then
echo >&2 "$0: bootstrapping from a non-checked-out distribution is risky"
exit 1
fi
get_po
test -d m4 || mkdir m4
test -f ChangeLog || cat > ChangeLog <<EOF
# This file is a placeholder. Run make to generate actual ChangeLog.
EOF
autoreconf -f -i -s