Perhaps the install plugin should accept a flag to ignore if already
installed. Something like:
forge install-plugin --skip-installed
-Dan
On Wed, May 9, 2012 at 8:54 AM, Jason Porter <lightguard.jp(a)gmail.com>wrote:
I want to install the plugin if it's not available.
On Wed, May 9, 2012 at 5:39 AM, Lincoln Baxter, III <
lincolnbaxter(a)gmail.com> wrote:
> Hmm... you want to make sure that a plugin is installed in a FSH script.
> Good question...
>
> Do you need the plugin to be available, or just installed (and possible
> not available in the current context.) In reality, you probably really want
> to check for the availability of the command, yes?
>
> I know that the shell throws errors on failure, but I'm not sure there's
> really a good way to test for that in a FSH script without using a
> try-catch block somehow. (Try catch would probably work, though I'm not
> exactly sure what the syntax would look like (it depends on your script to
> some extent.))
>
> ~Lincoln
>
> On Mon, May 7, 2012 at 3:27 PM, Jason Porter <lightguard.jp(a)gmail.com>wrote:
>
>> Any idea how this could be done? I could do a forge list-plugins --all
>> and iterate over that list (I think), but there should be a better way. Any
>> suggestions?
>>
>> --
>> Jason Porter
>>
http://lightguard-jp.blogspot.com
>>
http://twitter.com/lightguardjp
>>
>> Software Engineer
>> Open Source Advocate
>> Author of Seam Catch - Next Generation Java Exception Handling
>>
>> PGP key id: 926CCFF5
>> PGP key available at:
keyserver.net,
pgp.mit.edu
>>
>> _______________________________________________
>> forge-dev mailing list
>> forge-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/forge-dev
>>
>>
>
>
> --
> Lincoln Baxter, III
>
http://ocpsoft.org
> "Simpler is better."
>
> _______________________________________________
> forge-dev mailing list
> forge-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/forge-dev
>
>
--
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp
Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling
PGP key id: 926CCFF5
PGP key available at:
keyserver.net,
pgp.mit.edu
_______________________________________________
forge-dev mailing list
forge-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev
--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597