Debian Codegraph @

tests/ansible/lib/modules/bash_return_paths.sh

raw
1 #!/bin/bash
2
3 # I am an Ansible WANT_JSON module that returns the paths to its argv[0] and
4 # args file.
5
6 INPUT="$1"
7
8 [ ! -r "$INPUT" ] && {
9 echo "Usage: $0 <input_file.json>" >&2
10 exit 1
11 }
12
13 echo "{"
14 echo " \"changed\": false,"
15 echo " \"msg\": \"Here is my input\","
16 echo " \"input\": [$(< $INPUT)],"
17 echo " \"argv0\": \"$0\","
18 echo " \"argv1\": \"$1\""
19 echo "}"