File: echo.cwl

package info (click to toggle)
cwltool 1.0.20181217162649%2Bdfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,632 kB
  • sloc: python: 11,008; makefile: 153; sh: 22
file content (25 lines) | stat: -rwxr-xr-x 578 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env cwl-runner
class: CommandLineTool
cwlVersion: v1.0
inputs:
  r: string
  script:
    type: string
    default: |
      from __future__ import print_function
      import sys
      print(sys.argv[1])
      if sys.argv[1] == "2":
        exit(1)
      else:
        f = open("foo"+sys.argv[1]+".txt", "wb")
        content = sys.argv[1]+"\n"
        f.write(content.encode('utf-8'))
      if sys.argv[1] == "5":
        exit(1)
outputs:
  out:
    type: File
    outputBinding:
      glob: foo$(inputs.r).txt
arguments: [python3, -c, $(inputs.script), $(inputs.r)]