[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gforge-commits] gforge setup,1.4,1.5 README.setup,1.1,1.2
From: |
cbayle |
Subject: |
[Gforge-commits] gforge setup,1.4,1.5 README.setup,1.1,1.2 |
Date: |
Thu, 15 Jan 2004 16:12:44 -0600 |
Update of /cvsroot/gforge/gforge
In directory db.perdue.net:/tmp/cvs-serv3198
Modified Files:
setup README.setup
Log Message:
More options
Index: setup
===================================================================
RCS file: /cvsroot/gforge/gforge/setup,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- setup 13 Jan 2004 16:57:45 -0000 1.4
+++ setup 15 Jan 2004 22:12:42 -0000 1.5
@@ -2,9 +2,14 @@
apacheconf=/etc/apache/httpd.conf
usage() {
- echo "$0: [-interact] [-help] [-debug]"
+ echo "$0: [-interact] [-help] [-debug] [-input conffile] [-output
conffile] [-example] [-clean]"
}
+CONFFILEIN=etc/gforge.conf
+CONFFILEOUT=etc/gforge.conf
+LOCALINC=etc/local.inc
+HTTPDCONF=etc/httpd.conf
+
while [ $# -ne 0 ]
do
case "$1" in
@@ -16,6 +21,27 @@
usage
exit 0
;;
+ -input )
+ shift
+ CONFFILEIN=$1
+ ;;
+ -output )
+ shift
+ CONFFILEOUT=$1
+ ;;
+ -example )
+ CONFFILEIN=etc/gforge.conf.example
+ CONFFILEOUT=etc/gforge.conf.example
+ LOCALINC=etc/local.inc.example
+ HTTPDCONF=etc/httpd.conf.example
+ ;;
+ -clean )
+ rm -f $HTTPDCONF
+ rm -f etc/httpd.secrets
+ rm -f $LOCALINC
+ rm -f $CONFFILEIN
+ exit 0
+ ;;
-debug )
set -x
;;
@@ -24,7 +50,6 @@
usage
;;
esac
- echo "$#"
shift
done
@@ -63,6 +88,8 @@
DEFAULTldap_web_add_password=$(dd if=/dev/urandom count=256 bs=1 2> /dev/null
| md5sum | cut -b1-8)
DEFAULTcgidir=`pwd`/utils
DEFAULTcronolog_path=`type cronolog | cut -d' ' -f3`
+DEFAULTsys_path_to_jpgraph=/usr/share/jpgraph/
+DEFAULTsys_path_to_cvsweb=/usr/lib/gforge/bin/
DEFAULTgforge_chroot=""
DEFAULTgforge_etc=`pwd`/etc
DEFAULTgroupdir=`pwd`/home/groups
@@ -125,9 +152,10 @@
computedefault
writedefault etc/gforge.conf.new
-if [ -f etc/gforge.conf ]
+if [ -f $CONFFILEIN ]
then
- readdefault etc/gforge.conf
+ readdefault $CONFFILEIN
+ echo "Red default from $CONFFILEIN"
else
readdefault etc/gforge.conf.new
fi
@@ -146,7 +174,7 @@
rm -f $tmpfile
writedefault etc/gforge.conf.new
-mv etc/gforge.conf.new etc/gforge.conf
+mv etc/gforge.conf.new $CONFFILEOUT
#cat $0 | grep '^DEFAULT' | sed 's/^DEFAULT\(.[^=]*\)=.*/DEFAULT\1 \1/' |
while read defvar var
#do
# echo $defvar $var
@@ -154,23 +182,23 @@
# Remove trailing space
-cat etc/gforge.conf | sed 's/ *$//' > etc/gforge.conf.new
-mv etc/gforge.conf.new etc/gforge.conf
+cat $CONFFILEIN | sed 's/ *$//' > etc/gforge.conf.new
+mv etc/gforge.conf.new $CONFFILEIN
-echo "Create etc/httpd.conf and etc/httpd.secrets"
+echo "Create $HTTPDCONF and etc/httpd.secrets"
for i in etc/httpd.d/[0-4][0-9]* etc/httpd.d/httpd.secrets
do
- utils/fill-in-the-blanks.pl $i etc/`basename $i` etc/gforge.conf
+ utils/fill-in-the-blanks.pl $i etc/`basename $i` $CONFFILEOUT
done
-ls etc/[0-9][0-9]* | sort | xargs cat > etc/httpd.conf
+ls etc/[0-9][0-9]* | sort | xargs cat > $HTTPDCONF
rm etc/[0-9][0-9]*
-echo "Create etc/local.inc"
+echo "Create $LOCALINC"
for i in etc/local.d/01* etc/local.d/10*simple etc/local.d/[2-9]*
do
- utils/fill-in-the-blanks.pl $i etc/`basename $i` etc/gforge.conf
+ utils/fill-in-the-blanks.pl $i etc/`basename $i` $CONFFILEOUT
done
-ls etc/01* etc/10*simple etc/[2-9]* | sort | xargs cat > etc/local.inc
+ls etc/01* etc/10*simple etc/[2-9]* | sort | xargs cat > $LOCALINC
rm etc/01* etc/10*simple etc/[2-9]*
Index: README.setup
===================================================================
RCS file: /cvsroot/gforge/gforge/README.setup,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- README.setup 24 Nov 2003 23:29:55 -0000 1.1
+++ README.setup 15 Jan 2004 22:12:42 -0000 1.2
@@ -15,6 +15,12 @@
etc/local.inc is generated from files in etc/local.d
etc/httpd.conf is generated from files in etc/httpd.d
+local.inc.example was generated doing:
+./setup -input etc/gforge.conf.example -output etc/gforge.conf.example
+mv etc/local.inc etc/local.inc.example
+
+./setup -help will give you all available switch
+
Let me know if this was usefull and the change you had to do to make it run
on your system
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gforge-commits] gforge setup,1.4,1.5 README.setup,1.1,1.2,
cbayle <=
- Prev by Date:
[Gforge-commits] gforge/etc gforge.conf.example, NONE, 1.1 httpd.conf.example, NONE, 1.1
- Next by Date:
[Gforge-commits] gforge/www/include/languages French.tab,1.76,1.77
- Previous by thread:
[Gforge-commits] gforge/etc gforge.conf.example, NONE, 1.1 httpd.conf.example, NONE, 1.1
- Next by thread:
[Gforge-commits] gforge/www/include/languages French.tab,1.76,1.77
- Index(es):