Ah, I guess the symlink won't work - the grass.sh script sees the symlink 
location as it's starting point instead of in the app.  It probably needs some 
shell redirect thing (like a script in /usr/local/bin instead of a symlink) 
that I don't really know much about.  Or maybe a shell alias would work (again, 
shell dummy here).

On Jan 9, 2014, at 9:40 AM, Dheeraj Chand wrote:

> Possibly this isn't the expected behaviour?
> 
> REINHEIT:~ dheerajchand$ sudo ln -sfh 
> /Applications/GRASS-6.4.app/Contents/MacOS/grass.sh /usr/local/bin/grass
> Password:
> REINHEIT:~ dheerajchand$ which grass
> /usr/local/bin/grass
> REINHEIT:~ dheerajchand$ grass
> cut: /usr/local/bin/etc/VERSIONNUMBER: No such file or directory
> /usr/local/bin/grass: line 75: /usr/local/bin/etc/build_html_user_index.sh: 
> No such file or directory
> /usr/local/bin/grass: line 76: /usr/local/bin/etc/build_gui_user_menu.sh: No 
> such file or directory
> Python 2.6.8 found.
> /usr/local/bin/grass: line 271: /usr/local/bin/etc/Init.sh: No such file or 
> directory
> /usr/local/bin/grass: line 271: exec: /usr/local/bin/etc/Init.sh: cannot 
> execute: No such file or directory
> REINHEIT:~ dheerajchand$
> 
> Also, when I tried running the Python script that will call the GRASS script, 
> here is the debug output:
> 
> All done! Time to run GRASS!
> Initializing BASH script...
> 
> Replacing the variable names...
> 
> Calling the bash script...
> 
> /bin/sh: ./precincter.sh: No such file or directory
> /bin/sh: 003: command not found
> /bin/sh: 005: command not found
> GRASS is done running!
> 
> Process finished with exit code 0
> 
> Here is the Python in question:
> 
> print "All done! Time to run GRASS!"
> 
> #set the grass environment variables
> grass_location = "latlon"
> grass_mapset = "delaware"
> grass_state_fips = "10"
> grass_county_list = "001;003;005"
> 
> print("Initializing BASH script...\n")
> 
> #set the bash script and replace with the necessary variables
> bashscript = "./precincter.sh ||location ||mapset output_l output_r 
> ||state_fips ||county_list"
> 
> print("Replacing the variable names...\n")
> 
> bashscript = bashscript.replace('||location', grass_location)
> bashscript = bashscript.replace('||mapset', grass_mapset)
> bashscript = bashscript.replace('||state_fips', grass_state_fips)
> bashscript = bashscript.replace('||county_list', grass_county_list)
> 
> print("Calling the bash script...\n")
> 
> #call the bash script
> subprocess.call(bashscript, shell=True)
> 
> print "GRASS is done running!"
> 
> 
> So it is my suspicion that I did something horrendously wrong. 
> 
> -dx
> 
> 
> 
> On Jan 9, 2014, at 9:20 AM, William Kyngesburye <[email protected]> 
> wrote:
> 
>> That's the installer readme.  Another readme is installed in /Users/Shared.
>> 
>> But yes that ln should work.  grass.sh is the same as grass64 on linux.
>> 
>> On Jan 9, 2014, at 9:14 AM, Dheeraj Chand wrote:
>> 
>>> Hello again!
>>> 
>>> Here are the contents of the readme, which aren't there. So, your 
>>> suggestion is that it's as easy as ` ln -sfh 
>>> /Applications/GRASS-6.4.app/Contents/MacOS/grass.sh /usr/local/bin` ? 
>>> 
>>> -dx
>>> 
>>> 
>>> GRASS 6.4
>>> 
>>> 6.4.3-2     2013-8-17
>>> 
>>> IMPORTANT: the installer doesn't check for requirements, and will happily 
>>> install GRASS if anything is missing, BUT, GRASS will not run properly, if 
>>> at all.  Make sure to install all requirements before running GRASS.
>>> 
>>> Mac OS 10.6 (Snow Leopard) or newer is required.  Also, the GDAL Complete 
>>> 1.10, FreeType, and cairo frameworks, and the Python Imaging Library (PIL) 
>>> are required.
>>> 
>>> Most of the modules of GRASS are available as 64bit executables.  The GUIs 
>>> (both TclTk and wxPython) are 32bit.  NVIZ, v.digit (wx and TclTk) and any 
>>> modules that use libform (TclTk-based) are also 32bit only.
>>> 
>>> wxPython
>>> 
>>> The wxPython GUI makes use of the system MacPython 2.6.  There is no need 
>>> to install this.
>>> 
>>> wxPython is included in the GRASS application - there is no need to install 
>>> it separately.
>>> 
>>> Tcl/Tk
>>> 
>>> The Tcl/Tk GUI, and NVIZ and v.digit, use an Aqua Tcl/Tk 8.5.  There may be 
>>> some small layout issues.
>>> 
>>> Tcl/Tk is included in the GRASS application - there is no need to install 
>>> it separately.
>>> 
>>> 
>>> - William Kyngesburye
>>> [email protected]
>>> http://www.kyngchaos.com/
>>> 
>>> 
>>> 
>>> On Jan 9, 2014, at 8:37 AM, William Kyngesburye <[email protected]> 
>>> wrote:
>>> 
>>>> I think there is info in the installed readme.  You can make a symlink to 
>>>> the grass.sh in the app in /usr/local/bin.
>>>> 
>>>> On Jan 8, 2014, at 11:48 PM, Dheeraj Chand wrote:
>>>> 
>>>>> Hey, all! I'm using William Kyngesburye's GRASS for Mac OS X Mavericks. 
>>>>> It seems to install as a traditional Mac application, which opens and has 
>>>>> a Terminal that can be used. It doesn't seem to install to the bin, the 
>>>>> way that the Linux versions do.  Here's my situation. I have a script 
>>>>> that we can call "geographizer.sh" that contains lots and lots of 
>>>>> instructions for GRASS that was written by a colleague. This script needs 
>>>>> to be executed at the end of a complex Python script, with the last 
>>>>> command being, essentially, "Now, run this bash script!" My question is 
>>>>> whether or not I can, so to speak, use the WK GRASS as if it were 
>>>>> installed in the bin, as it is in Ubuntu.  If so, can someone guide me 
>>>>> through setting that up?
>>>>> 
>>>>> Best,
>>>>> 
>>>>> -dx
>>>>> _______________________________________________
>>>>> grass-user mailing list
>>>>> [email protected]
>>>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>> 
>>> 
>> 
>> -----
>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>> http://www.kyngchaos.com/
>> 
>> All generalizations are dangerous, even this one.
>> 
>> 
> 

_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to