commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r5029 - trunk/gnue-common


From: jcater
Subject: r5029 - trunk/gnue-common
Date: Thu, 8 Jan 2004 22:49:42 -0600 (CST)

Author: jcater
Date: 2004-01-08 22:49:41 -0600 (Thu, 08 Jan 2004)
New Revision: 5029

Modified:
   trunk/gnue-common/setup-cvs.py
Log:
made ./setup-cvs.py --auto really quiet

Modified: trunk/gnue-common/setup-cvs.py
===================================================================
--- trunk/gnue-common/setup-cvs.py      2004-01-09 04:24:25 UTC (rev 5028)
+++ trunk/gnue-common/setup-cvs.py      2004-01-09 04:49:41 UTC (rev 5029)
@@ -44,7 +44,8 @@
 def createShell (script,py,scriptdir="scripts"):
   script = "%s%s" % (script, SUFFIX)
   dest = os.path.join(CURRENT_DIR, scriptdir, script)
-  print "Creating %s....." % dest ,
+  if not auto:
+    print "Creating %s....." % dest ,
   try:
     file = open(dest,'w')
     file.write(cvsbase % py)
@@ -58,7 +59,8 @@
   except IOError:
     print "Unable to create.  Do you have this package checked out?"
   else:
-    print "ok"
+    if not auto:
+      print "ok"
 
 def createDocs(sgmlfile, destdir):
   if not willInstallDocs:
@@ -178,7 +180,7 @@
 restarting = ('--withNewExecutable' in sys.argv)
 auto = ('--auto' in sys.argv)
 
-if not restarting:
+if not restarting and not auto:
   print """
 GNU Enterprise Developer Setup
 
@@ -242,7 +244,8 @@
 
 if not restarting:
 
-  print """
+  if not auto:
+    print """
 If you are trying to install GNU Enterprise for production
 use, then answer 'N' to the following question and install
 each tool separately using it's setup.py script.
@@ -256,7 +259,7 @@
 
 
   # Make sure they are running against the version of python they intended
-  if len(exes) > 1:
+  if len(exes) > 1 and not auto:
 
     print "\n"
     print "I have found the following Python executables. Please"
@@ -285,8 +288,9 @@
     if selection != '1':
       restartWithExecutable(exes[int(selection)-1])
 
-print
-print "Continuing with the CVS installation...\n"
+if not auto:
+  print
+  print "Continuing with the CVS installation...\n"
 
 
 try:
@@ -298,7 +302,8 @@
   sys.exit()
 
 
-print """
+if not auto:
+  print """
 This setup script can install GNUe as either a local (per user)
 copy or a system-wide copy.  If you are unsure, choose the
 recommended 'Local' setting.  Installing system-wide will require
@@ -326,7 +331,8 @@
       getYesNo("Directory %s does not exist. Create? (Yes,No,All,neVer)" % 
BINDIR, 'Y','directories'):
     break
 
-print """
+if not auto:
+  print """
 If you maintain multiple GNUe CVS installations, you may
 wish to add a suffix to the script names. For example, if
 are installing the 0.1.x branch as a secondary branch, you
@@ -367,7 +373,7 @@
           getYesNo("Directory %s does not exist. Create? (Yes,No,All,neVer)" % 
DOCDIR, 'Y','directories'):
         newdirs.append(DOCDIR)
         break
-else:
+elif not auto:
   print "Cannot generate documentation, could not find db2html in path\n";
 
 
@@ -412,30 +418,30 @@
 
 rootCommands.append("""
     cd %(GNUEDIR)s
-    ln -s %(CVSDIR)s/gnue-common/module/base/__init__.py .
-    ln -s %(CVSDIR)s/gnue-common/src common
+    ln -f -s %(CVSDIR)s/gnue-common/module/base/__init__.py .
+    ln -f -s %(CVSDIR)s/gnue-common/src common
     if [ -f %(CVSDIR)s/gnue-common/src/.GDTD.py ]; then rm -f 
%(CVSDIR)s/gnue-common/src/.GDTD.py; fi
-#    ln -s %(CVSDIR)s/gnue-common/scripts/gnuedtd 
%(CVSDIR)s/common/src/.GDTD.py
+#    ln -f -s %(CVSDIR)s/gnue-common/scripts/gnuedtd 
%(CVSDIR)s/common/src/.GDTD.py
 
     cd %(CONFDIR)s/etc
     rm -f sample.*
-    ln -s %(CVSDIR)s/gnue-common/etc/sample.* .
+    ln -f -s %(CVSDIR)s/gnue-common/etc/sample.* .
 
     cd %(CONFDIR)s/share/locale
     rm -f ?? ??_??
-    ln -s %(CVSDIR)s/gnue-common/translations/?? %(CONFDIR)s/share/locale/
-    ln -s %(CVSDIR)s/gnue-common/translations/??_?? %(CONFDIR)s/share/locale/
+    ln -f -s %(CVSDIR)s/gnue-common/translations/?? %(CONFDIR)s/share/locale/
+    ln -f -s %(CVSDIR)s/gnue-common/translations/??_?? 
%(CONFDIR)s/share/locale/
 
     """ % globals() )
 
 def createLink(file, dest, overwrite=0):
   if overwrite:
     rootCommands.append ("if [ -e %s ]; then rm -f %s; fi" % (dest, dest))
-  rootCommands.append("ln -s %s/%s %s" % (CURRENT_DIR, file, dest))
+  rootCommands.append("ln -f -s %s/%s %s" % (CURRENT_DIR, file, dest))
 
 
 def linkModule(subdir, module):
-  rootCommands.append("ln -s %s/%s %s/%s" % (CURRENT_DIR, subdir, GNUEDIR, 
module))
+  rootCommands.append("ln -f -s %s/%s %s/%s" % (CURRENT_DIR, subdir, GNUEDIR, 
module))
 
 
 for CURRENT_TOOL in ('gnue-common',
@@ -451,8 +457,10 @@
   global CURRENT_DIR
   CURRENT_DIR = os.path.join(CVSDIR, CURRENT_TOOL)
   setupfile = os.path.join(CURRENT_DIR, 'setup.cvs')
-  print setupfile
 
+  if not auto:
+    print setupfile
+
   if os.path.isfile(setupfile) and \
      getYesNo('Setup CVS environment for %s? (Yes,No,All,neVer)'% CURRENT_TOOL,
              'Y','autotools'):





reply via email to

[Prev in Thread] Current Thread [Next in Thread]