forked from guendto/quvi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautogen.sh
executable file
·64 lines (59 loc) · 1.64 KB
/
autogen.sh
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
#!/bin/sh
#
# quvi
# Copyright (C) 2012 Toni Gundogdu <[email protected]>
#
# This file is part of quvi <http://quvi.sourceforge.net/>.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public
# License as published by the Free Software Foundation, either
# version 3 of the License, or (at your option) any later version.
#
# This program 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General
# Public License along with this program. If not, see
# <http://www.gnu.org/licenses/>.
#
set -e
source=.gitignore
cachedir=autom4te.cache
cleanup()
{
echo "WARNING
This will remove the files specified in the $source file. This will also
remove the $cachedir/ directory with all of its contents.
Bail out now (^C) or hit enter to continue."
read n1
[ -f Makefile ] && make distclean
for file in `cat $source`; do # Remove files only.
[ -e "$file" ] && [ -f "$file" ] && rm -f "$file"
done
[ -e "$cachedir" ] && rm -rf "$cachedir"
rmdir -p config.aux 2>/dev/null
exit 0
}
help()
{
echo "Usage: $0 [-c|-h]
-h Show this help and exit
-c Make the source tree 'maintainer clean'
Run without options to (re)generate the configuration files."
exit 0
}
while [ $# -gt 0 ]
do
case "$1" in
-c) cleanup;;
-h) help;;
*) break;;
esac
shift
done
mkdir -p m4
echo "Generate configuration files..."
autoreconf -if && ./configure "$@"