[GRASS-SVN] r37898 - grass/trunk/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jun 15 16:45:14 EDT 2009


Author: martinl
Date: 2009-06-15 16:45:13 -0400 (Mon, 15 Jun 2009)
New Revision: 37898

Modified:
   grass/trunk/lib/init/grass.py
Log:
fix bash_startup


Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2009-06-15 20:13:51 UTC (rev 37897)
+++ grass/trunk/lib/init/grass.py	2009-06-15 20:45:13 UTC (rev 37898)
@@ -690,7 +690,7 @@
 
 def bash_startup():
     global exit_val
-
+    
     # save command history in mapset dir and remember more
     os.environ['HISTFILE'] = os.path.join(location, ".bash_history")
     if not os.getenv('HISTSIZE') and not os.getenv('HISTFILESIZE'):
@@ -707,16 +707,16 @@
     try_remove(bashrc)
 
     f = open(bashrc, 'w')
-    f.write("test -r ~/.alias && . ~/.alias")
-    f.write("PS1='GRASS %s (%s):\w > '" % (grass_version, location_name))
-    f.write("PROMPT_COMMAND=%s" % gfile("etc", "prompt.sh"))
+    f.write("test -r ~/.alias && . ~/.alias\n")
+    f.write("PS1='GRASS %s (%s):\w > '\n" % (grass_version, location_name))
+    f.write("PROMPT_COMMAND=%s\n" % gfile("etc", "prompt.sh"))
 
     path = os.path.join(userhome, ".grass.bashrc")
     if os.access(path, os.R_OK):
-	f.write(readfile(path))
+	f.write(readfile(path) + '\n')
 
-    f.write("export PATH=\"%s\"" % os.getenv('PATH'))
-    f.write("export HOME=\"%s\"" % userhome) # restore user home path
+    f.write("export PATH=\"%s\"\n" % os.getenv('PATH'))
+    f.write("export HOME=\"%s\"\n" % userhome) # restore user home path
 
     f.close()
 



More information about the grass-commit mailing list