// --argfile name
private static final String ARGFILEDIRNAME = "{argfiledirname}";
+ // an output file wildcard to signify --output=*.ext is really --all --output
+ // {basename}.ext
+ private static final String OUTPUTWILDCARD = "*.";
+
// flag to say whether {n} subtitutions in output filenames should be made.
// Turn on and off with --substitutions and --nosubstitutions
// Start with it on
{
if (linkedId == null)
{
- if (allLinkedIds && a.hasOption(Opt.ALLOWALL))
+ if (a.hasOption(Opt.OUTPUT) && a.hasOption(Opt.ALLOWALL)
+ && val.startsWith(OUTPUTWILDCARD))
+ {
+ // --output=*.ext is shorthand for --all --output {basename}.ext
+ // (or --image=*.ext)
+ allLinkedIds = true;
+ linkedId = MATCHALLLINKEDIDS;
+ String oldval = val;
+ val = LINKEDIDBASENAME
+ + val.substring(OUTPUTWILDCARD.length() - 1);
+ }
+ else if (allLinkedIds && a.hasOption(Opt.ALLOWALL))
{
linkedId = MATCHALLLINKEDIDS;
}