Browse Source

prism-auto: don't expand to filename for exports if 'stdout'

PRISM recognizes the filename 'stdout' as special and exports
to standard output, so prepending a directory by prism-auto
does not make sense.


git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11592 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Joachim Klein 10 years ago
parent
commit
79e5f3b68d
  1. 8
      prism/etc/scripts/prism-auto

8
prism/etc/scripts/prism-auto

@ -199,6 +199,10 @@ def possibleNameClash(fullName):
def expandName(dir, option):
splitOption = option.split(':')
# if the filename is 'stdout' (recognized as special by PRISM),
# we don't expand and simply return the input
if splitOption[0] == "stdout":
return option
fullName = os.path.join(dir, splitOption[0])
return fullName + (":" + splitOption[1] if len(splitOption) > 1 else '')
@ -207,6 +211,10 @@ def expandName(dir, option):
def prependToFile(prefix, option):
splitOption = option.split(':')
# if the filename is 'stdout' (recognized as special by PRISM),
# we don't expand and simply return the input
if splitOption[0] == "stdout":
return option
fullName = os.path.join(os.path.dirname(splitOption[0]), 'tmp.' + os.path.basename(splitOption[0]))
return fullName + (":" + splitOption[1] if len(splitOption) > 1 else '')

Loading…
Cancel
Save