Re: How to get around MacPorts assuming that Exit code: 1 is a failure?
On Feb 8, 2014, at 19:22, Eric Gallager eg...@gwmail.gwu.edu wrote: I am working on a Portfile from which I want to call the `unifdef` command. The manpage for `unifdef` says: Exit status is 0 if output is exact copy of input, 1 if not, 2 if trouble. The whole reason I am running `unifdef` is to change the output, so I want it to return 1. However, when I put this in my Portfile, it interprets this as a failure. Is there any way that I can get around this? You could wrap it in a catch and handle it how you want to handle it. ___ macports-dev mailing list macports-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-dev
How to get around MacPorts assuming that Exit code: 1 is a failure?
I am working on a Portfile from which I want to call the `unifdef` command. The manpage for `unifdef` says: Exit status is 0 if output is exact copy of input, 1 if not, 2 if trouble. The whole reason I am running `unifdef` is to change the output, so I *want* it to return 1. However, when I put this in my Portfile, it interprets this as a failure. Is there any way that I can get around this? ___ macports-dev mailing list macports-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-dev
Re: How to get around MacPorts assuming that Exit code: 1 is a failure?
On 2014-2-9 12:22 , Eric Gallager wrote: I am working on a Portfile from which I want to call the `unifdef` command. The manpage for `unifdef` says: Exit status is 0 if output is exact copy of input, 1 if not, 2 if trouble. The whole reason I am running `unifdef` is to change the output, so I /want/ it to return 1. However, when I put this in my Portfile, it interprets this as a failure. Is there any way that I can get around this? unifdef || [ $? -ne 2 ] ___ macports-dev mailing list macports-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-dev
Re: How to get around MacPorts assuming that Exit code: 1 is a failure?
I had to escape the brackets, but after that, it worked. Thanks! On Sat, Feb 8, 2014 at 9:23 PM, Joshua Root j...@macports.org wrote: On 2014-2-9 12:22 , Eric Gallager wrote: I am working on a Portfile from which I want to call the `unifdef` command. The manpage for `unifdef` says: Exit status is 0 if output is exact copy of input, 1 if not, 2 if trouble. The whole reason I am running `unifdef` is to change the output, so I /want/ it to return 1. However, when I put this in my Portfile, it interprets this as a failure. Is there any way that I can get around this? unifdef || [ $? -ne 2 ] ___ macports-dev mailing list macports-dev@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-dev