[GRASS-SVN] r40693 - in grass/trunk: lib/init mswindows
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 27 03:22:37 EST 2010
Author: hamish
Date: 2010-01-27 03:22:35 -0500 (Wed, 27 Jan 2010)
New Revision: 40693
Modified:
grass/trunk/lib/init/functions.sh
grass/trunk/lib/init/grass.py
grass/trunk/lib/init/init.bat
grass/trunk/mswindows/GRASS-Installer.nsi
Log:
another attempt at an improved MSys dos prompt (merge from devbr6)
Modified: grass/trunk/lib/init/functions.sh
===================================================================
--- grass/trunk/lib/init/functions.sh 2010-01-27 08:10:39 UTC (rev 40692)
+++ grass/trunk/lib/init/functions.sh 2010-01-27 08:22:35 UTC (rev 40693)
@@ -745,15 +745,19 @@
default_startup()
{
- PS1="GRASS $GRASS_VERSION ($LOCATION_NAME):\w > "
- export PS1
+ if [ "$MINGW" ] ; then
+ GRASS_MAJOR_VERSION=`echo "$GRASS_VERSION" | cut -f1 -d.`
+ PS1="GRASS $GRASS_MAJOR_VERSION> "
+ export PS1
- if [ "$MINGW" ] ; then
# "$ETC/run" doesn't work at all???
- "$SHELL"
+ "$SHELL"
rm -rf "$LOCATION/.tmp"/* # remove GUI session files from .tmp
else
- "$ETC/run" "$SHELL"
+ PS1="GRASS $GRASS_VERSION ($LOCATION_NAME):\w > "
+ export PS1
+
+ "$ETC/run" "$SHELL"
EXIT_VAL=$?
fi
}
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2010-01-27 08:10:39 UTC (rev 40692)
+++ grass/trunk/lib/init/grass.py 2010-01-27 08:22:35 UTC (rev 40693)
@@ -730,13 +730,13 @@
def default_startup():
global exit_val
- os.environ['PS1'] = "GRASS %s (%s):\w > " % (grass_version, location_name)
-
if windows:
+ os.environ['PS1'] = "GRASS %s> " % (grass_version, location_name)
# "$ETC/run" doesn't work at all???
exit_val = call([os.getenv('SHELL')])
cleanup_dir(os.path.join(location, ".tmp")) # remove GUI session files from .tmp
else:
+ os.environ['PS1'] = "GRASS %s (%s):\w > " % (grass_version, location_name)
exit_val = call([gfile("etc", "run"), os.getenv('SHELL')])
def done_message():
Modified: grass/trunk/lib/init/init.bat
===================================================================
--- grass/trunk/lib/init/init.bat 2010-01-27 08:10:39 UTC (rev 40692)
+++ grass/trunk/lib/init/init.bat 2010-01-27 08:22:35 UTC (rev 40693)
@@ -45,9 +45,11 @@
set GRASS_PAGER=more
if "%GRASS_WISH%"=="" set GRASS_WISH=wish.exe
if "%GRASS_SH%"=="" set GRASS_SH=c:\msys\1.0\bin\sh.exe
+
rem Should do something with "assoc .html" and ftype here but would require
rem a new g.manual.bat too so leaving it like this for now...
if "%GRASS_HTML_BROWSER%"=="" set GRASS_HTML_BROWSER=%SYSTEMDRIVE%/PROGRA~1/INTERN~1/IEXPLORE.EXE
+
if "%GRASS_PROJSHARE%"=="" set GRASS_PROJSHARE=CONFIG_PROJSHARE
rem Add python scripts to the PATHEXT variable
Modified: grass/trunk/mswindows/GRASS-Installer.nsi
===================================================================
--- grass/trunk/mswindows/GRASS-Installer.nsi 2010-01-27 08:10:39 UTC (rev 40692)
+++ grass/trunk/mswindows/GRASS-Installer.nsi 2010-01-27 08:22:35 UTC (rev 40693)
@@ -647,8 +647,6 @@
FileWrite $0 'GRASS_PROJSHARE="$INSTALL_DIR\proj"$\r$\n'
FileWrite $0 'export GRASS_PROJSHARE$\r$\n'
FileWrite $0 '$\r$\n'
- FileWrite $0 'export PS1="GRASS 7> "$\r$\n'
- FileWrite $0 '$\r$\n'
FileWrite $0 'exec "$$GISBASE/etc/Init.sh" "$$@"'
FileClose $0
done_create_grass_command:
More information about the grass-commit
mailing list