How to associate /opt/local/bin/bash with .bat files

2014-01-28 Thread David Favor

Can someone point me to the docs that describe
how to associate Mac files (like .bat) with the
MacPorts version of bash.

Thanks!
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: How to associate /opt/local/bin/bash with .bat files

2014-01-28 Thread Clemens Lang
Hi,

On Tue, Jan 28, 2014 at 07:23:22AM -0600, David Favor wrote:
 Can someone point me to the docs that describe how to associate Mac
 files (like .bat) with the MacPorts version of bash.

Macs (and other Unix systems) don't associate files and their
interpreters based on the filename extension. Only windows uses this
method.

Instead, a method called the shebang is used for script files. The
first line in the file you're trying to execute should be in the form of
  #!/path/to/the/binary/which/should/be/used/to/run/this/script

Editing your script and making the first line
  #!/opt/local/bin/bash
should cause MacPorts bash to be used to execute the script. Another
common method is using /usr/bin/env, which in turn uses $PATH to
determine which binary to use:
  #!/usr/bin/env bash

Note that .bat scripts are usually written for windows shell and will
not work with bash on OS X (but you'll probably notice that, if your
script doesn't work).

Further reading: http://en.wikipedia.org/wiki/Shebang_%28Unix%29

-- 
Clemens Lang

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: How to associate /opt/local/bin/bash with .bat files

2014-01-28 Thread Arno Hautala
On Tue, Jan 28, 2014 at 8:40 AM, Clemens Lang c...@macports.org wrote:
 Macs (and other Unix systems) don't associate files and their
 interpreters based on the filename extension. Only windows uses this
 method.

That's not entirely true. Macs used to use File Type and Creator codes
to associate files and in those days extensions weren't required on
file names. These attributes are still visible via commands like
GetFileInfo. Their use is certainly deprecated and I wouldn't be
surprised if it isn't consulted at all in current versions of OS X.
Seems that as of 10.6 they're ignored in favor of Uniform Type
Identifiers: http://en.wikipedia.org/wiki/Creator_code

I'm fairly sure that the current mix of UTI and extension mapping is a
mess though. At least, it seemed to be the last time I looked into it.
That's another thread though.

These days, if you Get Info on a file (select the file in the Finder
and use Command-I or File  Get Info) there is a section labeled Open
With. You can select an application from the list or explicitly
browse to some other application. When changing the selection, there's
a button to Change All. Pressing that will prompt to associate all
files with extension '.bat' with the new application. Some extensions
are associated with known types, and some files are marked with UTIs,
and will instead ask if you want to associate, for example, all text
files instead of listing .txt.

In your case though, you wouldn't want to associate a .bat or .sh
file with bash, you'd want to set it to be opened by Terminal.app.
You can then edit the shebang line to set which shell should be used
to interpret the script, as indicated by Clemens.

-- 
arno  s  hautala/-|   a...@alum.wpi.edu

pgp b2c9d448
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: How to associate /opt/local/bin/bash with .bat files

2014-01-28 Thread Gregory Shenaut
If you've installed Parallels, .bat files are associated by default with 
Notepad.app (in the the Windows system). There might be some way to associate 
them with Windows Console, but I don't know. The “Default Apps” system 
preference pane might be a good place to start (google it). 

The other thing worth mentioning is to not to forget to set the execute bit on 
your scripts.

By the way, I personally believe that MacOS's use of file suffixes to define 
the type of a file is one of its most embarrassing and annoying attributes.

Greg

On Jan 28, 2014, at 06:49 , Arno Hautala a...@alum.wpi.edu wrote:

 On Tue, Jan 28, 2014 at 8:40 AM, Clemens Lang c...@macports.org wrote:
 Macs (and other Unix systems) don't associate files and their
 interpreters based on the filename extension. Only windows uses this
 method.
 
 That's not entirely true. Macs used to use File Type and Creator codes
 to associate files and in those days extensions weren't required on
 file names. These attributes are still visible via commands like
 GetFileInfo. Their use is certainly deprecated and I wouldn't be
 surprised if it isn't consulted at all in current versions of OS X.
 Seems that as of 10.6 they're ignored in favor of Uniform Type
 Identifiers: http://en.wikipedia.org/wiki/Creator_code
 
 I'm fairly sure that the current mix of UTI and extension mapping is a
 mess though. At least, it seemed to be the last time I looked into it.
 That's another thread though.
 
 These days, if you Get Info on a file (select the file in the Finder
 and use Command-I or File  Get Info) there is a section labeled Open
 With. You can select an application from the list or explicitly
 browse to some other application. When changing the selection, there's
 a button to Change All. Pressing that will prompt to associate all
 files with extension '.bat' with the new application. Some extensions
 are associated with known types, and some files are marked with UTIs,
 and will instead ask if you want to associate, for example, all text
 files instead of listing .txt.
 
 In your case though, you wouldn't want to associate a .bat or .sh
 file with bash, you'd want to set it to be opened by Terminal.app.
 You can then edit the shebang line to set which shell should be used
 to interpret the script, as indicated by Clemens.
 
 -- 
 arno  s  hautala/-|   a...@alum.wpi.edu
 
 pgp b2c9d448
 ___
 macports-users mailing list
 macports-users@lists.macosforge.org
 https://lists.macosforge.org/mailman/listinfo/macports-users

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: How to associate /opt/local/bin/bash with .bat files

2014-01-28 Thread Brandon Allbery
On Tue, Jan 28, 2014 at 1:49 PM, Gregory Shenaut gkshen...@ucdavis.eduwrote:

 If you've installed Parallels, .bat files are associated by default with
 Notepad.app (in the the Windows system). There might be some way to
 associate them with Windows Console, but I don't know. The “Default Apps”
 system preference pane might be a good place to start (google it).


cmd.exe is secretly a GUI app: it figures out from how it is invoked
whether to create its own window or run in an existing one.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Which SOAP?

2014-01-28 Thread Bill Christensen

Hi folks,

I need to install SOAP on a 10.8.5/Apache2.x/PHP 5.3.x machine, and I 
have no idea which of the variants to install.


It's for a FedEx plugin for WooCommerce. 
http://www.woothemes.com/products/fedex-shipping-module/



Thanks in advance.
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Which SOAP?

2014-01-28 Thread Bradley Giesbrecht

On Jan 28, 2014, at 7:15 PM, Bill Christensen billc_li...@greenbuilder.com 
wrote:

 Hi folks,
 
 I need to install SOAP on a 10.8.5/Apache2.x/PHP 5.3.x machine, and I have no 
 idea which of the variants to install.
 
 It's for a FedEx plugin for WooCommerce. 
 http://www.woothemes.com/products/fedex-shipping-module/


The site linked above does not mention extension or class so I'm guessing that 
the WooCommerce FedEx plugin wants the php soap extension.

If I am correct you want one of these that matches the php version you are 
using:
$ port echo name:php.*soap
php5-soap
php53-soap
php54-soap
php55-soap


Regards,
Bradley Giesbrecht (pixilla)

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Which SOAP?

2014-01-28 Thread Jeremy Lavergne
Sounds like you’re after PHP’s extension for SOAP. I’d recommend php54-soap in 
general, but if you want MacPorts to auto-upgrade you beyond PHP 5.4 then use 
php5-soap.

On Jan 28, 2014, at 22:15, Bill Christensen billc_li...@greenbuilder.com 
wrote:

 I need to install SOAP on a 10.8.5/Apache2.x/PHP 5.3.x machine, and I have no 
 idea which of the variants to install.

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Which SOAP?

2014-01-28 Thread Ryan Schmidt

On Jan 28, 2014, at 21:15, Bill Christensen billc_li...@greenbuilder.com 
wrote:

 I need to install SOAP on a 10.8.5/Apache2.x/PHP 5.3.x machine, and I have no 
 idea which of the variants to install.
 
 It's for a FedEx plugin for WooCommerce. 
 http://www.woothemes.com/products/fedex-shipping-module/

SOAP is not a program or a library; it’s a protocol for exchanging information 
between systems:

http://en.wikipedia.org/wiki/SOAP

There are probably hundreds of different libraries implementing the SOAP 
protocol in a variety of languages.

If, for example, you want to write PHP code to use the SOAP protocol to 
communicate with FedEx or any other SOAP-compatible service, PHP includes a 
SOAP module.

http://php.net/soap

In MacPorts, it’s not installed by default, but you can install it separately. 
Which port you use to do so depends on which port you’re using for PHP.

If you’re using the php5 port, the SOAP module is in the port php5-soap. 
If you’re using the php53 port, the SOAP module is in the port php53-soap. 
If you’re using the php54 port, the SOAP module is in the port php54-soap. 
If you’re using the php55 port, the SOAP module is in the port php55-soap. 


___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: Which SOAP?

2014-01-28 Thread Ryan Schmidt
On Jan 28, 2014, at 21:26, Jeremy Lavergne jer...@lavergne.gotdns.org wrote:

 Sounds like you’re after PHP’s extension for SOAP. I’d recommend php54-soap 
 in general, but if you want MacPorts to auto-upgrade you beyond PHP 5.4 then 
 use php5-soap.

php5-soap (and all of the other ports whose names begin with php5 and not 
php53, php54, php55, etc.) are deprecated and won’t be updated past version 
5.3.x, so you should migrate to the new php53, php54, php55, etc. ports.

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


SOAP Nope. (Was: Re: Which SOAP?)

2014-01-28 Thread Bill Christensen

On 1/28/14 9:29 PM, Ryan Schmidt wrote:

On Jan 28, 2014, at 21:15, Bill Christensen billc_li...@greenbuilder.com 
wrote:


I need to install SOAP on a 10.8.5/Apache2.x/PHP 5.3.x machine, and I have no 
idea which of the variants to install.

It's for a FedEx plugin for WooCommerce. 
http://www.woothemes.com/products/fedex-shipping-module/

SOAP is not a program or a library; it’s a protocol for exchanging information 
between systems:

http://en.wikipedia.org/wiki/SOAP

There are probably hundreds of different libraries implementing the SOAP 
protocol in a variety of languages.

If, for example, you want to write PHP code to use the SOAP protocol to 
communicate with FedEx or any other SOAP-compatible service, PHP includes a 
SOAP module.

http://php.net/soap

In MacPorts, it’s not installed by default, but you can install it separately. 
Which port you use to do so depends on which port you’re using for PHP.

If you’re using the php5 port, the SOAP module is in the port php5-soap.
If you’re using the php53 port, the SOAP module is in the port php53-soap.
If you’re using the php54 port, the SOAP module is in the port php54-soap.
If you’re using the php55 port, the SOAP module is in the port php55-soap.




Thanks for the super quick responses, all.

I'm running php 5.3.28, so I installed php53-soap.  Unfortunately, that 
didn't do the trick.  Restarted Apache, nothing.  Even rebooted the 
server, still no joy. Attempting to activate the plugin gives me an 
error that it requires SOAP support on the server/hosting to function, 
with a link to http://php.net/manual/en/class.soapclient.php


Any further suggestions?

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Got it (was Re: Which SOAP?)

2014-01-28 Thread Bill Christensen

On 1/28/14 9:31 PM, Ryan Schmidt wrote:

On Jan 28, 2014, at 21:26, Jeremy Lavergne jer...@lavergne.gotdns.org wrote:


Sounds like you’re after PHP’s extension for SOAP. I’d recommend php54-soap in 
general, but if you want MacPorts to auto-upgrade you beyond PHP 5.4 then use 
php5-soap.

php5-soap (and all of the other ports whose names begin with php5 and not 
php53, php54, php55, etc.) are deprecated and won’t be updated past version 
5.3.x, so you should migrate to the new php53, php54, php55, etc. ports.


Thanks all.  Turns out I've got php5 port installed, so php5-soap is 
working for now. And yes, I probably ought to upgrade soon.

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users