File: hsi

package info (click to toggle)
duplicity 3.0.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,260 kB
  • sloc: python: 25,089; sh: 934; ansic: 392; makefile: 83
file content (16 lines) | stat: -rwxr-xr-x 380 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python3

import subprocess
import sys

cmd = sys.argv[1].split()
if cmd[0] == u'get':
    cmd = ['cp', cmd[3], cmd[1]]
elif cmd[0] == u'put':
    cmd = ['cp', cmd[1], cmd[3]]
elif cmd[0] == u'ls':
    # output some expected header lines
    print('one', file=sys.stderr)
    print('two', file=sys.stderr)

sys.exit(subprocess.call(' '.join(cmd) + ' 1>&2', shell=True))