File: custom_bash_old_style_module.sh

package info (click to toggle)
python-mitogen 0.3.26-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,456 kB
  • sloc: python: 22,134; sh: 183; makefile: 74; perl: 19; ansic: 18
file content (21 lines) | stat: -rwxr-xr-x 517 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# I am an Ansible old-style module.

# This line is to encourage a UnicodeDecodeError in
# integration/runner/custom_script_interpreter.yml
#   see https://github.com/dw/mitogen/issues/195
#   £££ 
INPUT=$1

[ ! -r "$INPUT" ] && {
    echo "Usage: $0 <input_file>" >&2
    exit 1
}

echo "{"
echo "  \"changed\": false,"
echo "  \"msg\": \"Here is my input\","
echo "  \"filename\": \"$INPUT\","
echo "  \"run_via_env\": \"$RUN_VIA_ENV\","
echo "  \"input\": [\"$(cat $INPUT | tr \" \' )\"]"
echo "}"