Il giorno martedì 11 dicembre 2012 00:03:57 UTC+1, Lex Trotman ha scritto:
>
> [...]
>
> > The patch is really small, and the idea could be integrated easily in
> the
> > install command.
>
> Yes, that would be a good idea, then scripts don't have to try
> install, test if it fails and then try replace.
>
>
Done. The patch is about 3 lines, attached.
> > I mean, install if the backend does not exist or replace *with a
> warning* if
> > it existed.
> >
> > This morning I was writing a backend for my company, and I had to
> re-install
> > it often ;)
> >
>
> I would have installed it once in my home directory (the default
> anyway) and just edited things there until it worked, then copied the
> files to where I was making the zip file.
>
> Cheers
> Lex
>
>
> >>
> >> Cheers
> >> Lex
> >>
> >>
> >> >
> >> > Cheers,
> >> >
> >> >
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "asciidoc" group.
> >> > To view this discussion on the web visit
> >> > https://groups.google.com/d/msg/asciidoc/-/4mGzGx4MVPMJ.
> >> >
> >> > To post to this group, send email to [email protected].
> >> > To unsubscribe from this group, send email to
> >> > [email protected].
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/asciidoc?hl=en.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "asciidoc" group.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msg/asciidoc/-/pqm_YA7p5WYJ.
> >
> > To post to this group, send email to [email protected]<javascript:>.
>
> > To unsubscribe from this group, send email to
> > [email protected] <javascript:>.
> > For more options, visit this group at
> > http://groups.google.com/group/asciidoc?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/asciidoc/-/_vjq4NZQ3C0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.
diff -r 1ce2d73109e2 asciidoc.py
--- a/asciidoc.py Sun Oct 07 08:31:02 2012 +1300
+++ b/asciidoc.py Tue Dec 11 10:30:44 2012 +0100
@@ -5785,7 +5785,11 @@
die('user home directory is not defined')
plugin_dir = os.path.join(plugins_dir, plugin_name)
if os.path.exists(plugin_dir):
- die('%s is already installed: %s' % (Plugin.type, plugin_dir))
+ message.verbose('%s is already installed, '
+ 'and it is going to be replaced' %
+ Plugin.type)
+ args[0] = os.path.basename(plugin_dir)
+ Plugin.remove(args)
try:
os.makedirs(plugin_dir)
except Exception,e: