[GRASSLIST:2494] Re: Trouble with handling of my path by grass

ted byers ted.byers at sympatico.ca
Wed Sep 26 22:15:44 EDT 2001


I don't know how to make a diff.   Never tried that before.  However the
following few lines from the bottom of Init.sh should provide a reference.
I have copied, and commented out the original lines, for the purpose of this
message.

What I did, was, load Init.sh in emacs, search for "export PATH=$PATH", and
when I found one, inserted \" around $PATH.  Two instances, as shown, were
found.  Your change will be all of eight characters, in the places shown
below.

bash)
    USERHOME=$HOME      # save original home
    HOME=$LOCATION      # save .bashrc in $LOCATION
    export HOME
    bashrc=$HOME/.bashrc
    rm -f $bashrc
    echo "test -z $PROFILEREAD && . /etc/profile" > $bashrc
    echo "test -e ~/.alias && . ~/.alias" >> $bashrc
    echo "umask 022" >> $bashrc
    echo "PS1='GRASS:\w > '" >> $bashrc

    if [ -r $USERHOME/.grass.bashrc ]
    then
        cat $USERHOME/.grass.bashrc >> $bashrc
    fi

    echo "export PATH=\"$PATH\"" >> $bashrc
#    echo "export PATH=$PATH" >> $bashrc
    echo "export HOME=$USERHOME" >> $bashrc # restore user home path

    $ETC/run $SHELL
    HOME=$USERHOME
    export HOME
    ;;

cygwin)
    USERHOME=$HOME      # save original home
    HOME=$LOCATION      # save .bashrc in $LOCATION
    export HOME
    bashrc=$HOME/.bashrc
    rm -f $bashrc
    # this does not work on cygwin for unknown reasons
    # echo "test -z $PROFILEREAD && . /etc/profile" > $bashrc
    echo "test -e ~/.alias && . ~/.alias" >> $bashrc
    echo "umask 022" >> $bashrc
    echo "PS1='GRASS:\w > '" >> $bashrc

    if [ -r $USERHOME/.grass.bashrc ]
    then
        cat $USERHOME/.grass.bashrc >> $bashrc
    fi

    echo "export PATH=\"$PATH\"" >> $bashrc
#    echo "export PATH=$PATH" >> $bashrc
    echo "export HOME=$USERHOME" >> $bashrc # restore user home path

    $ETC/run $SHELL
    HOME=$USERHOME
    export HOME
    ;;

*)

Does this help?

Cheers,

Ted


> -----Original Message-----
> From: owner-GRASSLIST at baylor.edu [mailto:owner-GRASSLIST at baylor.edu]On
> Behalf Of Eric G. Miller
> Sent: Wednesday, September 26, 2001 9:37 PM
> To: GRASSLIST at baylor.edu
> Subject: [GRASSLIST:2493] Re: Trouble with handling of my
> path by grass
>
>
> Is it possible for you to post a diff of "Init.sh" or otherwise show
> the lines you changed?  I can commit a change, but want it to be as
> minimal as possible.
>
>
> --
> Eric G. Miller <egm2 at jps.net>
>



More information about the grass-user mailing list