Update NEWS for v0.9.3
[cclive.git] / bootstrap.sh
blob3bf84d6250a393e1115337545d3223c2af6cd246
1 #!/bin/sh
3 # cclive
4 # Copyright (C) 2012-2013 Toni Gundogdu <legatvs@gmail.com>
6 # This file is part of cclive <http://cclive.sourceforge.net/>.
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU Affero General Public License as
10 # published by the Free Software Foundation, either version 3 of the
11 # License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # Affero General Public License for more details.
18 # You should have received a copy of the GNU Affero General Public
19 # License along with this program. If not, see
20 # <http://www.gnu.org/licenses/>.
22 set -e
24 source=.gitignore
25 cachedir=autom4te.cache
27 cleanup()
29 echo "WARNING
30 This will remove the files specified in the $source file. This will also
31 remove the $cachedir/ directory with all of its contents.
32 Bail out now (^C) or hit enter to continue."
33 read n1
34 for file in `cat $source`; do # Remove files only.
35 [ -e "$file" ] && [ -f "$file" ] && rm -f "$file"
36 done
37 [ -e "$cachedir" ] && rm -rf "$cachedir"
38 rmdir -p config.aux 2>/dev/null
39 exit 0
42 help()
44 echo "Usage: $0 [-c|-h]
45 -h Show this help and exit
46 -c Make the source tree 'maintainer clean'
47 Run without options to (re)generate the configuration files."
48 exit 0
51 clean_flag=off
52 while [ $# -gt 0 ]
54 case "$1" in
55 -c) cleanup;;
56 -h) help;;
57 *) break;;
58 esac
59 shift
60 done
62 echo "Generate configuration files..."
63 autoreconf -if && echo "You can now run 'configure'"