(CommandList children: [ (FuncDef name: p666_show_usage body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(p666_printf_error)} {(DQ (${ VSub_At '@'))})] spids: [16777215 117] ) ] spids: [16777215 129] ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: {('usage: posixcube.sh -h HOST... [OPTION]... COMMAND...\n') ('\n') ( ' posixcube.sh is a POSIX compliant shell script server automation framework.\n' ) (' Use consistent APIs for common tasks and package functionality and file\n') (' templates in cubes (like recipes/playbooks from other frameworks).\n') ('\n') (' -? Help.\n') ( ' -h HOST Target host. Option may be specified multiple times. If a host has\n' ) (" a wildcard ('*'), then HOST is interpeted as a regular expression,\n") ( " with '*' replaced with '.*' and any matching hosts in the following\n" ) (' files are added to the HOST list: /etc/ssh_config,\n') (' /etc/ssh/ssh_config, ~/.ssh/config, /etc/ssh_known_hosts,\n') (' /etc/ssh/ssh_known_hosts, ~/.ssh/known_hosts, and /etc/hosts.\n') ( ' -c CUBE Execute a cube. Option may be specified multiple times. If COMMANDS\n' ) (' are also specified, cubes are run first.\n') (' -u USER SSH user. Defaults to ${USER}.\n') (' -e ENVAR Shell script with environment variable assignments which is\n') (' uploaded and sourced on each HOST. Option may be specified\n') (' multiple times. Files ending with .enc will be decrypted\n') ( ' temporarily. If not specified, defaults to envars*sh envars*sh.enc\n' ) (' -p PWD Password for decrypting .enc ENVAR files.\n') ( ' -w PWDF File that contains the password for decrypting .enc ENVAR files.\n' ) (' Defaults to ~/.posixcube.pwd\n') (' -r ROLE Role name. Option may be specified multiple times.\n') (' -o P=V Set the specified parameter P with the value V. Do not put double\n') ( ' quotes around V. If V contains *, try to find matching hosts per\n' ) (' the -h algorithm. Option may be specified multiple times.\n') ( ' -i CUBE Upload a CUBE but do not execute it. This is needed when one CUBE\n' ) (' includes this CUBE using cube_include.\n') (' -v Show version information.\n') (' -d Print debugging information.\n') (' -q Quiet; minimize output.\n') ( ' -b If using bash, install programmable tab completion for SSH hosts.\n' ) (' -s Skip remote host initialization (making ~/posixcubes, uploading\n') (' posixcube.sh, etc.\n') (' -k Keep the cube_exec.sh generated script.\n') (' -z SPEC Use the SPEC set of options from the ./cubespecs.ini file\n') (' -a Asynchronously execute remote CUBEs/COMMANDs. Works on Bash only.\n') ( ' -y If a HOST returns a non-zero code, continue processing other HOSTs.\n' ) (' COMMAND Remote command to run on each HOST. Option may be specified\n') ( ' multiple times. If no HOSTs are specified, available sub-commands:\n' ) (' edit: Decrypt, edit, and re-encrypt ENVAR file with $EDITOR.\n') (' show: Decrypt and print ENVAR file.\n') (' source: Source all ENVAR files. Must be run with\n') ( ' POSIXCUBE_SOURCED (see Public Variables section below).\n' ) ('\n') ('Description:\n') ('\n') ( ' posixcube.sh is used to execute CUBEs and/or COMMANDs on one or more HOSTs.\n' ) (' \n') (' A CUBE is a shell script or directory containing shell scripts. The CUBE\n') ( " is rsync'ed to each HOST. If CUBE is a shell script, it's executed. If\n" ) (' CUBE is a directory, a shell script of the same name in that directory\n') (' is executed. In both cases, the directory is changed to the directory\n') (' containing the script before execution so that you may reference files\n') (' such as templates using relative paths.\n') (' \n') (' An ENVAR script is encouraged to use environment variable names of the form\n') ( ' cubevar_${uniquecontext}_envar="value". If a CUBE directory contains the\n' ) (" file `envars.sh`, it's sourced before anything else (including `-e ENVARs`).\n") (' \n') ( ' Both CUBEs and COMMANDs may execute any of the functions defined in the\n' ) (' "Public APIs" in the posixcube.sh script. Short descriptions of the functions\n') ( ' are in the APIs section below. See the source comments above each function\n' ) (' for details.\n') (' \n') ('Examples (assuming posixcube.sh is on ${PATH}, or executed absolutely):\n') ('\n') (' posixcube.sh -h socrates uptime\n') (' \n') ( ' Run the `uptime` command on host `socrates`. This is not very different\n' ) (' from ssh ${USER}@socrates uptime, except that COMMANDs (`uptime`) have\n') (' access to the cube_* public functions.\n') (' \n') (' posixcube.sh -h socrates -c test.sh\n') (' \n') (' Run the `test.sh` script (CUBE) on host `socrates`. The script has\n') (' access to the cube_* public functions.\n') (' \n') (' posixcube.sh -h socrates -c test\n') (' \n') (' Upload the entire `test` directory (CUBE) to the host `socrates` and\n') (' then execute the `test.sh` script within that directory (the name\n') (' of the script is expected to be the same as the name of the CUBE). This\n') (' allows for easily packaging other scripts and resources needed by\n') (' `test.sh`.\n') (' \n') (' posixcube.sh -u root -h socrates -h seneca uptime\n') (' \n') (' Run the `uptime` command on hosts `socrates` and `seneca`\n') (' as the user `root`.\n') (' \n') (' posixcube.sh -h web*.test.com uptime\n') (' \n') ( ' Run the `uptime` command on all hosts matching the regular expression\n' ) (' web.*.test.com in the SSH configuration files.\n') (' \n') ( ' sudo ${PATH_TO}/posixcube.sh -b && . /etc/bash_completion.d/posixcube_completion.sh\n' ) (' \n') (' For Bash users, install a programmable completion script to support tab\n') (' auto-completion of hosts from SSH configuration files.\n') ('\n') (' posixcube.sh -e production.sh.enc show\n') (' \n') (' Decrypt and show the contents of production.sh\n') (' \n') (' posixcube.sh -e production.sh.enc edit\n') (' \n') ( ' Decrypt, edit, and re-encrypt the contents of production.sh with $EDITOR\n' ) ('\n') ('Philosophy:\n') ('\n') ( ' Fail hard and fast. In principle, a well written script would check ${?}\n' ) (' after each command and either gracefully handle it, or report an error.\n') (' Few people write scripts this well, so we enforce this check (using\n') (' `cube_check_return` within all APIs) and we encourage you to do the same\n') ( ' in your scripts with `touch /etc/fstab || cube_check_return`. All cube_*\n' ) (" APIs are guaranteed to do their own checks, so you don't have to do this\n") ( " for those calls; however, note that if you're executing a cube_* API in a\n" ) (' sub-shell, although any failures will be reported by cube_check_return,\n') ( ' the script will continue unless you also check the return of the sub-shell.\n' ) (' For example: $(cube_readlink /etc/localtime) || cube_check_return\n') ( ' With this strategy, unfortunately piping becomes more difficult. There are\n' ) (' non-standard mechanisms like pipefail and PIPESTATUS, but the standardized\n') ( ' approach is to run each command separately and check the status. For example:\n' ) (' cube_app_result1="$(command1 || cube_check_return)" || cube_check_return\n') ( ' cube_app_result2="$(printf \'%s\' "${cube_app_result1}" | command2 || cube_check_return)" || cube_check_return\n' ) (' \n') (' We do not use `set -e` because some functions may handle all errors\n') ( ' internally (with `cube_check_return`) and use a positive return code as a\n' ) (' "benign" result (e.g. `cube_set_file_contents`).\n') ('\n') ('Frequently Asked Questions:\n') ('\n') ( ' * Why is there a long delay between "Preparing hosts" and the first remote\n' ) (' execution?\n') (' \n') ( " You can see details of what's happening with the `-d` flag. By default,\n" ) (' the script first loops through every host and ensures that ~/posixcubes/\n') ( ' exists, then it transfers itself to the remote host. These two actions\n' ) (" may be skipped with the `-s` parameter if you've already run the script\n") ( " at least once and your version of this script hasn't been updated. Next,\n" ) (' the script loops through every host and transfers any CUBEs and a script\n') (' containing the CUBEs and COMMANDs to run (`cube_exec.sh`). Finally,\n') (' you\'ll see the "Executing on HOST..." line and the real execution starts.\n') ('\n') ('Cube Development:\n') ('\n') (" Shell scripts don't have scoping, so to reduce the chances of function name\n") ( ' conflicts, name functions cube_${cubename}_${function} and name variables\n' ) (' cubevar_${cubename}_${var}.\n') ('\n') ('Public APIs:\n') (' \n') (' * cube_echo\n') (' Print ${@} to stdout prefixed with ([$(date)] [$(hostname)]) and\n') (' suffixed with a newline.\n') (' Example: cube_echo "Hello World"\n') ('\n') (' * cube_printf\n') (' Print $1 to stdout prefixed with ([$(date)] [$(hostname)]) and\n') (' suffixed with a newline (with optional printf arguments in $@).\n') (' Example: cube_printf "Hello World from PID %5s" $$\n') ('\n') (' * cube_error_echo\n') ( ' Same as cube_echo except output to stderr and include a red "Error: "\n' ) (' message prefix.\n') (' Example: cube_error "Goodbye World"\n') ('\n') (' * cube_error_printf\n') (' Same as cube_printf except output to stderr and include a red "Error: "\n') (' message prefix.\n') (' Example: cube_error "Goodbye World from PID %5s" $$\n') ('\n') (' * cube_throw\n') ( ' Same as cube_error_echo but also print a stack of functions and processes\n' ) (' (if available) and then call `exit 1`.\n') (' Example: cube_throw "Expected some_file."\n') ('\n') (' * cube_check_return\n') (' Check if $? is non-zero and call cube_throw if so.\n') (' Example: some_command || cube_check_return\n') ('\n') (' * cube_include\n') (' Include the ${1} cube\n') (' Example: cube_include core_cube\n') ('\n') (' * cube_check_numargs\n') (' Call cube_throw if there are less than $1 arguments in $@\n') (' Example: cube_check_numargs 2 "${@}"\n') ('\n') (' * cube_service\n') (' Run the $1 action on the $2 service.\n') (' Example: cube_service start crond\n') ('\n') (' * cube_package\n') ( ' Pass $@ to the package manager. Implicitly passes the the parameter\n' ) (' to say yes to questions.\n') (' Example: cube_package install python\n') ('\n') (' * cube_append_str\n') (' Echo $1 with $2 appended after a space if $1 was not blank.\n') ( ' Example: cubevar_app_str=$(cube_append_str "${cubevar_app_str}" "Test")\n' ) ('\n') (' * cube_command_exists\n') (' Check if $1 command or function exists in the current context.\n') (' Example: cube_command_exists systemctl\n') ('\n') (' * cube_dir_exists\n') (' Check if $1 exists as a directory.\n') (' Example: cube_dir_exists /etc/cron.d/\n') ('\n') (' * cube_file_exists\n') (' Check if $1 exists as a file with read access.\n') (' Example: cube_file_exists /etc/cron.d/0hourly\n') ('\n') (' * cube_operating_system\n') ( ' Detect operating system and return one of the POSIXCUBE_OS_* values.\n' ) (' Example: [ $(cube_operating_system) -eq ${POSIXCUBE_OS_LINUX} ] && ...\n') ('\n') (' * cube_operating_system_has_flavor\n') (' Check if the operating system flavor includes the flavor specified in $1\n') (' by one of the POSIXCUBE_OS_FLAVOR_* values.\n') (' Example: cube_operating_system_has_flavor ${POSIXCUBE_OS_FLAVOR_FEDORA} && ...\n') ('\n') (' * cube_shell\n') (' Detect running shell and return one of the CUBE_SHELL_* values.\n') (' Example: [ $(cube_shell) -eq ${POSIXCUBE_SHELL_BASH} ] && ...\n') ('\n') (' * cube_current_script_name\n') (' echo the basename of the currently executing script.\n') (' Example: script_name=$(cube_current_script_name)\n') ('\n') (' * cube_current_script_abs_path\n') (' echo the absolute path the currently executing script.\n') (' Example: script_name=$(cube_current_script_abs_path)\n') ('\n') (' * cube_file_size\n') (' echo the size of a file $1 in bytes\n') (' Example: cube_file_size some_file\n') ('\n') (' * cube_set_file_contents\n') ( " Copy the contents of $2 on top of $1 if $1 doesn't exist or the contents\n" ) (' are different than $2. If $2 ends with ".template", first evaluate all\n') (' ${VARIABLE} expressions (except for \\${VARIABLE}).\n') (' Example: cube_set_file_contents "/etc/npt.conf" "templates/ntp.conf"\n') ('\n') (' * cube_set_file_contents_string\n') (" Set the contents of $1 to the string $@. Create file if it doesn't exist.\n") (' Example: cube_set_file_contents_string ~/.info "Hello World"\n') ('\n') (' * cube_expand_parameters\n') ( " echo stdin to stdout with all ${VAR}'s evaluated (except for \\${VAR})\n" ) (' Example: cube_expand_parameters < template > output\n') ('\n') (' * cube_readlink\n') (' Echo the absolute path of $1 without any symbolic links.\n') (' Example: cube_readlink /etc/localtime\n') ('\n') (' * cube_random_number\n') (' Echo a random number between 1 and $1\n') (' Example: cube_random_number 10\n') ('\n') (' * cube_tmpdir\n') (' Echo a temporary directory\n') (' Example: cube_tmpdir\n') ('\n') (' * cube_total_memory\n') (' Echo total system memory in bytes\n') (' Example: cube_total_memory\n') ('\n') (' * cube_ensure_directory\n') (' Ensure directory $1 exists\n') (' Example: cube_ensure_directory ~/.ssh/\n') ('\n') (' * cube_ensure_file\n') (' Ensure file $1 exists\n') (' Example: cube_ensure_file ~/.ssh/authorized_keys\n') ('\n') (' * cube_pushd\n') (' Equivalent to `pushd` with $1\n') (' Example: cube_pushd ~/.ssh/\n') ('\n') (' * cube_popd\n') (' Equivalent to `popd`\n') (' Example: cube_popd\n') ('\n') (' * cube_has_role\n') (' Return true if the role $1 is set.\n') (' Example: cube_has_role "database_backup"\n') ('\n') (' * cube_file_contains\n') (' Check if the file $1 contains $2\n') (' Example: cube_file_contains /etc/fstab nfsmount\n') ('\n') (' * cube_stdin_contains\n') (' Check if stdin contains $1\n') (' Example: echo "Hello World" | cube_stdin_contains "Hello"\n') ('\n') (' * cube_interface_ipv4_address\n') (' Echo the IPv4 address of interface $1\n') (' Example: cube_interface_ipv4_address eth0\n') ('\n') (' * cube_interface_ipv6_address\n') (' Echo the IPv6 address of interface $1\n') (' Example: cube_interface_ipv6_address eth0\n') ('\n') (' * cube_prompt\n') ( ' Prompt the question $1 followed by " (y/N)" and prompt for an answer.\n' ) (' A blank string answer is equivalent to No. Return true if yes, false otherwise.\n') (' Example: cube_prompt "Are you sure?"\n') ('\n') (' * cube_hostname\n') (' Echo full hostname.\n') (' Example: cube_hostname\n') ('\n') (' * cube_user_exists\n') (' Check if the $1 user exists\n') (' Example: cube_user_exists nginx\n') ('\n') (' * cube_create_user\n') (' Create the user $1\n') (' Example: cube_create_user nginx\n') ('\n') (' * cube_group_exists\n') (' Check if the $1 group exists\n') (' Example: cube_group_exists nginx\n') ('\n') (' * cube_create_group\n') (' Create the group $1\n') (' Example: cube_create_group nginx\n') ('\n') (' * cube_group_contains_user\n') (' Check if the $1 group contains the user $2\n') (' Example: cube_group_contains_user nginx nginx\n') ('\n') (' * cube_add_group_user\n') (' Add the user $2 to group $1\n') (' Example: cube_add_group_user nginx nginx\n') ('\n') ('Public Variables:\n') ('\n') (' * POSIXCUBE_APIS_ONLY\n') ( ' Set this to any value to only source the public APIs in posixcube.sh.\n' ) (' Example: POSIXCUBE_APIS_ONLY=true . posixcube.sh && cube_echo $(cube_random_number 10)\n') (' \n') (' * POSIXCUBE_SOURCED\n') ( ' Set this to any value to only run a sub-COMMAND, most commonly `source`,\n' ) (' to source in all ENVAR files, but skip actual execution of posixcube.\n') ( ' Example: POSIXCUBE_SOURCED=true . posixcube.sh source; POSIXCUBE_SOURCED= ; cube_echo Test\n' ) ('\n') ('Source: https://github.com/myplaceonline/posixcube\n') } do_expansion: False here_end: HEREDOC was_filled: T spids: [139] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-ne)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(p666_printf_error)} {(DQ (${ VSub_At '@'))})] spids: [16777215 159] ) ] spids: [16777215 171] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name POSIXCUBE_SOURCED))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})] spids: [16777215 193] ) ] spids: [16777215 201] ) ] spids: [101] ) spids: [97 100] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_VERSION) op:Equal rhs:{(0.1)} spids:[216])] spids: [216] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_DEBUG) op:Equal rhs:{(0)} spids:[219])] spids: [219] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_RESET) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[0m'))} spids: [222] ) ] spids: [222] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_RED) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[31m'))} spids: [228] ) ] spids: [228] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_GREEN) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[32m'))} spids: [234] ) ] spids: [234] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_YELLOW) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[33m'))} spids: [240] ) ] spids: [240] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_BLUE) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[34m'))} spids: [246] ) ] spids: [246] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_PURPLE) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[35m'))} spids: [252] ) ] spids: [252] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_CYAN) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[36m'))} spids: [258] ) ] spids: [258] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_WHITE) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[37m'))} spids: [264] ) ] spids: [264] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_NEWLINE) op: Equal rhs: {(DQ ('\n'))} spids: [271] ) ] spids: [271] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_CUBE_NAME) op:Equal rhs:{(DQ )} spids:[276])] spids: [276] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_CUBE_NAME_WITH_PREFIX) op: Equal rhs: {(DQ )} spids: [280] ) ] spids: [280] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_OS_UNKNOWN) op:Equal rhs:{(-1)} spids:[285])] spids: [285] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_OS_LINUX) op:Equal rhs:{(1)} spids:[288])] spids: [288] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_OS_MAC_OSX) op:Equal rhs:{(2)} spids:[291])] spids: [291] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_OS_WINDOWS) op:Equal rhs:{(3)} spids:[294])] spids: [294] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_OS_FLAVOR_UNKNOWN) op: Equal rhs: {(-1)} spids: [298] ) ] spids: [298] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_OS_FLAVOR_FEDORA) op: Equal rhs: {(1)} spids: [301] ) ] spids: [301] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_OS_FLAVOR_DEBIAN) op: Equal rhs: {(2)} spids: [304] ) ] spids: [304] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_OS_FLAVOR_UBUNTU) op: Equal rhs: {(3)} spids: [307] ) ] spids: [307] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_SHELL_UNKNOWN) op: Equal rhs: {(-1)} spids: [311] ) ] spids: [311] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_SHELL_BASH) op:Equal rhs:{(1)} spids:[314])] spids: [314] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_NODE_HOSTNAME) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(hostname)})]) left_token: <Left_CommandSub '$('> spids: [320 322] ) ) } spids: [318] ) ] spids: [318] ) (FuncDef name: cube_echo body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name POSIXCUBE_CUBE_NAME_WITH_PREFIX))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [382 384] ) ('] [') (${ VSub_Name POSIXCUBE_COLOR_GREEN) (${ VSub_Name POSIXCUBE_NODE_HOSTNAME) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') ) } ) ] spids: [16777215 375] ) ] else_action: [ (C {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [406 408] ) ('] [') (${ VSub_Name POSIXCUBE_COLOR_GREEN) (${ VSub_Name POSIXCUBE_NODE_HOSTNAME) (${ VSub_Name POSIXCUBE_COLOR_RESET) (${ VSub_Name POSIXCUBE_COLOR_CYAN) (${ VSub_Name POSIXCUBE_CUBE_NAME_WITH_PREFIX) (CommandSubPart command_list: (CommandList children:[(C {(cube_line_number)} {(DQ (':'))})]) left_token: <Left_CommandSub '$('> spids: [425 431] ) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') ) } ) ] spids: [399 439] ) (C {(echo)} {(DQ (${ VSub_At '@'))}) ] spids: [354] ) spids: [350 353] ) (FuncDef name: cube_printf body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_printf_str) op: Equal rhs: {($ VSub_Number '$1')} spids: [496] ) ] spids: [496] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name POSIXCUBE_CUBE_NAME_WITH_PREFIX))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [528 530] ) ('] [') (${ VSub_Name POSIXCUBE_COLOR_GREEN) (${ VSub_Name POSIXCUBE_NODE_HOSTNAME) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') (${ VSub_Name cube_printf_str) (Lit_Other '\\') (n) ) } {(DQ (${ VSub_At '@'))} ) ] spids: [16777215 521] ) ] else_action: [ (C {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [563 565] ) ('] [') (${ VSub_Name POSIXCUBE_COLOR_GREEN) (${ VSub_Name POSIXCUBE_NODE_HOSTNAME) (${ VSub_Name POSIXCUBE_COLOR_RESET) (${ VSub_Name POSIXCUBE_COLOR_CYAN) (${ VSub_Name POSIXCUBE_CUBE_NAME_WITH_PREFIX) (CommandSubPart command_list: (CommandList children:[(C {(cube_line_number)} {(DQ (':'))})]) left_token: <Left_CommandSub '$('> spids: [582 588] ) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') (${ VSub_Name cube_printf_str) (Lit_Other '\\') (n) ) } {(DQ (${ VSub_At '@'))} ) ] spids: [556 607] ) ] spids: [493] ) spids: [489 492] ) (FuncDef name: cube_error_echo body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name POSIXCUBE_CUBE_NAME_WITH_PREFIX))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [668 670] ) ('] [') (${ VSub_Name POSIXCUBE_COLOR_RED) (${ VSub_Name POSIXCUBE_NODE_HOSTNAME) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') (${ VSub_Name POSIXCUBE_COLOR_RED) (Error) (${ VSub_Name POSIXCUBE_COLOR_RESET) (': ') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[692])] ) ] spids: [16777215 661] ) ] else_action: [ (SimpleCommand words: [ {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [703 705] ) ('] [') (${ VSub_Name POSIXCUBE_COLOR_RED) (${ VSub_Name POSIXCUBE_NODE_HOSTNAME) (${ VSub_Name POSIXCUBE_CUBE_NAME_WITH_PREFIX) (CommandSubPart command_list: (CommandList children: [(C {(cube_line_number)} {(DQ (':'))})] ) left_token: <Left_CommandSub '$('> spids: [716 722] ) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') (${ VSub_Name POSIXCUBE_COLOR_RED) (Error) (${ VSub_Name POSIXCUBE_COLOR_RESET) (': ') ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[737])] ) ] spids: [696 741] ) (SimpleCommand words: [{(echo)} {(DQ (${ VSub_At '@'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[752])] ) ] spids: [640] ) spids: [636 639] ) (FuncDef name: cube_error_printf body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_error_printf_str) op: Equal rhs: {($ VSub_Number '$1')} spids: [801] ) ] spids: [801] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name POSIXCUBE_CUBE_NAME_WITH_PREFIX))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [833 835] ) ('] [') (${ VSub_Name POSIXCUBE_COLOR_RED) (${ VSub_Name POSIXCUBE_NODE_HOSTNAME) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') (${ VSub_Name POSIXCUBE_COLOR_RED) (Error) (${ VSub_Name POSIXCUBE_COLOR_RESET) (': ') (${ VSub_Name cube_error_printf_str) (Lit_Other '\\') (n) ) } {(DQ (${ VSub_At '@'))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[868])] ) ] spids: [16777215 826] ) ] else_action: [ (SimpleCommand words: [ {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [879 881] ) ('] [') (${ VSub_Name POSIXCUBE_COLOR_RED) (${ VSub_Name POSIXCUBE_NODE_HOSTNAME) (${ VSub_Name POSIXCUBE_CUBE_NAME_WITH_PREFIX) (CommandSubPart command_list: (CommandList children: [(C {(cube_line_number)} {(DQ (':'))})] ) left_token: <Left_CommandSub '$('> spids: [892 898] ) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') (${ VSub_Name POSIXCUBE_COLOR_RED) (Error) (${ VSub_Name POSIXCUBE_COLOR_RESET) (': ') (${ VSub_Name cube_error_printf_str) (Lit_Other '\\') (n) ) } {(DQ (${ VSub_At '@'))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[924])] ) ] spids: [872 928] ) ] spids: [798] ) spids: [794 797] ) (FuncDef name: cube_throw body: (BraceGroup children: [ (C {(cube_error_echo)} {(DQ (${ VSub_At '@'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_throw_pid) op: Equal rhs: {($ VSub_Dollar '$$')} spids: [969] ) ] spids: [969] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DPipe] children: [ (C {(cube_command_exists)} {(caller)}) (C {(Lit_Other '[')} {(-r)} {(/proc/) (${ VSub_Name cube_throw_pid) (/cmdline)} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [(C {(cube_error_echo)} {(Stack) (Lit_Other ':')})] spids: [16777215 996] ) ] spids: [16777215 1005] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_command_exists)} {(caller)}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:x) op:Equal rhs:{(0)} spids:[1021])] spids: [1021] ) (While cond: [(Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_error_caller) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(caller)} {($ VSub_Name '$x')})] ) left_token: <Left_CommandSub '$('> spids: [1034 1038] ) } spids: [1033] ) ] spids: [1033] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_error_caller_result) op: Equal rhs: {(${ VSub_QMark '?')} spids: [1041] ) ] spids: [1041] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name cube_error_caller_result)} {(-eq)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_error_caller_result_lineno) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name cube_error_caller))} ) (C {(awk)} {(SQ <'{ print $1 }'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1066 1082] ) } spids: [1065] ) ] spids: [1065] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_error_caller_result_subroutine) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name cube_error_caller))} ) (C {(awk)} {(SQ <'{ print $2 }'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1086 1102] ) } spids: [1085] ) ] spids: [1085] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_error_caller_result_sourcefile) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name cube_error_caller))} ) (C {(awk)} { (SQ < '{ for(i=3;i<=NF;i++){ printf "%s ", $i }; printf "\\n" }' > ) } ) (C {(sed)} {(SQ <'s/ $//'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1106 1130] ) } spids: [1105] ) ] spids: [1105] ) (C {(cube_error_printf)} { (DQ (' [func] %4s ') (${ VSub_Name cube_error_caller_result_subroutine) (' ') (${ VSub_Name cube_error_caller_result_sourcefile) ) } {(DQ (${ VSub_Name cube_error_caller_result_lineno))} ) ] spids: [16777215 1062] ) ] else_action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [1153 1159] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:x) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(${ VSub_Name x)}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [1163 1170] ) } spids: [1162] ) ] spids: [1162] ) ] spids: [1030 1173] ) ) ] spids: [16777215 1018] ) ] spids: [16777215 1176] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(/proc/) (${ VSub_Name cube_throw_pid) (/cmdline)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (While cond: [(C {(true)})] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_throw_cmdline) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cat)} {(/proc/) (${ VSub_Name cube_throw_pid) (/cmdline)} ) ] ) left_token: <Left_CommandSub '$('> spids: [1212 1220] ) } spids: [1211] ) ] spids: [1211] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_throw_ppid) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(grep)} {(PPid)} {(/proc/) (${ VSub_Name cube_throw_pid) (/status)} ) (C {(awk)} {(SQ <'{ print $2; }'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1224 1242] ) } spids: [1223] ) ] spids: [1223] ) (C {(cube_error_printf)} {(DQ (' [pid] %5s ') (${ VSub_Name cube_throw_cmdline))} {(${ VSub_Name cube_throw_pid)} ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name cube_throw_pid))} {(Lit_Other '=')} {(DQ (1))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [16777215 1278] ) ] spids: [16777215 1287] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_throw_pid) op: Equal rhs: {(${ VSub_Name cube_throw_ppid)} spids: [1290] ) ] spids: [1290] ) ] spids: [1208 1296] ) ) ] spids: [16777215 1200] ) ] spids: [16777215 1299] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [955] ) spids: [951 954] ) (FuncDef name: cube_line_number body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_command_exists)} {(caller)}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:x) op:Equal rhs:{(0)} spids:[1350])] spids: [1350] ) (While cond: [(Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_api_caller_output) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(caller)} {($ VSub_Name '$x')})] ) left_token: <Left_CommandSub '$('> spids: [1363 1367] ) } spids: [1362] ) ] spids: [1362] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_api_caller_result) op: Equal rhs: {(${ VSub_QMark '?')} spids: [1370] ) ] spids: [1370] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name cube_api_caller_result)} {(-eq)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_api_caller_result_lineno) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} { (DQ (${ VSub_Name cube_api_caller_output) ) } ) (C {(awk)} {(SQ <'{ print $1 }'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1395 1411] ) } spids: [1394] ) ] spids: [1394] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_api_caller_result_subroutine) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} { (DQ (${ VSub_Name cube_api_caller_output) ) } ) (C {(awk)} {(SQ <'{ print $2 }'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1415 1431] ) } spids: [1414] ) ] spids: [1414] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_api_caller_result_sourcefile) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} { (DQ (${ VSub_Name cube_api_caller_output) ) } ) (C {(awk)} { (SQ < '{ for(i=3;i<=NF;i++){ printf "%s ", $i }; printf "\\n" }' > ) } ) (C {(sed)} {(SQ <'s/ $//'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1435 1459] ) } spids: [1434] ) ] spids: [1434] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: cube_api_caller_result_sourcefile_basename ) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} { (DQ (${ VSub_Name cube_api_caller_result_sourcefile ) ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [1463 1471] ) } spids: [1462] ) ] spids: [1462] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (${ VSub_Name cube_api_caller_result_sourcefile_basename ) ) } {(KW_Bang '!') (Lit_Other '=')} {(DQ (posixcube.sh))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 1))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(printf)} {(DQ ('%s'))} {(DQ (${ VSub_Number 1))}) ] spids: [16777215 1516] ) ] spids: [16777215 1532] ) (C {(printf)} {(DQ ('%s'))} {(DQ (${ VSub_Name cube_api_caller_result_lineno))} ) (ControlFlow token: <ControlFlow_Break break> ) ] spids: [16777215 1494] ) ] spids: [16777215 1551] ) ] spids: [16777215 1391] ) ] else_action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [1554 1560] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:x) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithWord w:{(${ VSub_Name x)}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [1564 1571] ) } spids: [1563] ) ] spids: [1563] ) ] spids: [1359 1574] ) ) ] spids: [16777215 1347] ) ] spids: [16777215 1577] ) ] spids: [1336] ) spids: [1332 1335] ) (FuncDef name: cube_check_return body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_check_return_val) op: Equal rhs: {(${ VSub_QMark '?')} spids: [1604] ) ] spids: [1604] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name cube_check_return_val)} {(-ne)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_check_return_info) op: Equal rhs: {(DQ )} spids: [1628] ) ] spids: [1628] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Star '*'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_check_return_info) op: Equal rhs: {(DQ (' (') (${ VSub_Star '*') (')'))} spids: [1655] ) ] spids: [1655] ) ] spids: [16777215 1652] ) ] spids: [16777215 1665] ) (C {(cube_throw)} { (DQ ('Previous command failed with code ') (${ VSub_Name cube_check_return_val) (${ VSub_Name cube_check_return_info) ) } ) ] spids: [16777215 1625] ) ] spids: [16777215 1681] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name cube_check_return_val)} ) ] spids: [1601] ) spids: [1597 1600] ) (FuncDef name: cube_append_str body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 1))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(DQ (${ VSub_Number 2))})] spids: [16777215 1761] ) ] else_action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 3))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(DQ (${ VSub_Number 1) (' ') (${ VSub_Number 2))})] spids: [16777215 1794] ) ] else_action: [ (C {(echo)} {(DQ (${ VSub_Number 1) (${ VSub_Number 3) (${ VSub_Number 2))}) ] spids: [1810 1828] ) ] spids: [1773 1831] ) ] spids: [1727] ) spids: [1723 1726] ) (FuncDef name: cube_command_exists body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (SimpleCommand words: [{(command)} {(-v)} {(${ VSub_Number 1)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [1883] ) (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[1886]) ] ) ] spids: [1861] ) spids: [1857 1860] ) (FuncDef name: cube_dir_exists body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (C {(Lit_Other '[')} {(-d)} {(DQ (${ VSub_Number 1))} {(Lit_Other ']')}) ] spids: [1917] ) spids: [1913 1916] ) (FuncDef name: cube_file_exists body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Number 1))} {(Lit_Other ']')}) ] spids: [1971] ) spids: [1967 1970] ) (FuncDef name: cube_operating_system body: (BraceGroup children: [ (Case to_match: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(uname)} {(-s)})]) left_token: <Left_CommandSub '$('> spids: [2029 2033] ) ) } arms: [ (case_arm pat_list: [{(Linux)}] action: [(C {(echo)} {(${ VSub_Name POSIXCUBE_OS_LINUX)})] spids: [2039 2040 2050 16777215] ) (case_arm pat_list: [{(Darwin)}] action: [(C {(echo)} {(${ VSub_Name POSIXCUBE_OS_MAC_OSX)})] spids: [2053 2054 2064 16777215] ) (case_arm pat_list: [ {(CYGWIN) (Lit_Other '*')} {(MINGW32) (Lit_Other '*')} {(MSYS) (Lit_Other '*')} ] action: [(C {(echo)} {(${ VSub_Name POSIXCUBE_OS_WINDOWS)})] spids: [2067 2075 2085 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(echo)} {(${ VSub_Name POSIXCUBE_OS_UNKNOWN)})] spids: [2088 2089 2099 16777215] ) ] spids: [2026 2036 2102] ) ] spids: [2019] ) spids: [2015 2018] ) (FuncDef name: cube_operating_system_has_flavor body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (Case to_match: {(DQ (${ VSub_Number 1))} arms: [ (case_arm pat_list: [{(${ VSub_Name POSIXCUBE_OS_FLAVOR_FEDORA)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_file_exists)} {(DQ (/etc/fedora-release))}) terminator: <Op_Semi ';'> ) ] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [16777215 2172] ) ] spids: [16777215 2180] ) ] spids: [2157 2160 2183 16777215] ) (case_arm pat_list: [{(${ VSub_Name POSIXCUBE_OS_FLAVOR_UBUNTU)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_file_exists)} {(DQ (/etc/lsb-release))}) terminator: <Op_Semi ';'> ) ] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [16777215 2201] ) ] spids: [16777215 2209] ) ] spids: [2186 2189 2212 16777215] ) (case_arm pat_list: [{(${ VSub_Name POSIXCUBE_OS_FLAVOR_DEBIAN)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DPipe] children: [ (C {(cube_file_contains)} {(/etc/os-release)} { (DQ ('NAME=') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (Debian) ) } ) (C {(cube_file_exists)} {(DQ (/etc/lsb-release))}) ] ) terminator: <Op_Semi ';'> ) ] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [16777215 2242] ) ] spids: [16777215 2250] ) ] spids: [2215 2218 2253 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(cube_throw)} {(DQ ('Unknown flavor ') (${ VSub_Number 1))})] spids: [2256 2257 2270 16777215] ) ] spids: [2146 2154 2273] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [2132] ) spids: [2128 2131] ) (FuncDef name: cube_shell body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$BASH'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(${ VSub_Name POSIXCUBE_SHELL_BASH)})] spids: [16777215 2326] ) ] else_action: [(C {(echo)} {(${ VSub_Name POSIXCUBE_SHELL_UNKNOWN)})] spids: [2336 2346] ) ] spids: [2302] ) spids: [2298 2301] ) (FuncDef name: cube_check_numargs body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_check_numargs_expected) op: Equal rhs: {($ VSub_Number '$1')} spids: [2382] ) ] spids: [2382] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Pound '#')} {(-lt)} {(${ VSub_Name cube_check_numargs_expected)} {(Lit_Other ']')} ) (C {(cube_throw)} { (DQ ('Expected ') (${ VSub_Name cube_check_numargs_expected) (' arguments, received ') (${ VSub_Pound '#') (.) ) } ) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [2379] ) spids: [2375 2378] ) (FuncDef name: cube_service body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_command_exists)} {(systemctl)}) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 1))} {(Lit_Other '=')} {(DQ (daemon-reload))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(systemctl)} {($ VSub_Number '$1')}) (C {(cube_check_return)}) ] ) ] spids: [16777215 2499] ) ] else_action: [ (AndOr ops: [Op_DPipe] children: [ (C {(systemctl)} {($ VSub_Number '$1')} {($ VSub_Number '$2')}) (C {(cube_check_return)}) ] ) ] spids: [2511 2525] ) ] spids: [16777215 2477] ) (if_arm cond: [ (Sentence child: (C {(cube_command_exists)} {(service)}) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 1))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (daemon-reload))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(service)} {($ VSub_Number '$2')} {($ VSub_Number '$1')}) (C {(cube_check_return)}) ] ) ] spids: [16777215 2559] ) ] spids: [16777215 2573] ) ] spids: [2528 2536] ) ] else_action: [(C {(cube_throw)} {(DQ ('Could not find service program'))})] spids: [2576 2586] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 2))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Case to_match: {(DQ (${ VSub_Number 1))} arms: [ (case_arm pat_list: [{(stop)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_service_verb) op: Equal rhs: {(DQ (stopped))} spids: [2626] ) ] spids: [2626] ) ] spids: [2622 2623 2632 16777215] ) (case_arm pat_list: [{(enable)} {(disable)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_service_verb) op: Equal rhs: {(DQ (${ VSub_Number 1) (d))} spids: [2641] ) ] spids: [2641] ) ] spids: [2635 2638 2650 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_service_verb) op: Equal rhs: {(DQ (${ VSub_Number 1) (ed))} spids: [2657] ) ] spids: [2657] ) ] spids: [2653 2654 2666 16777215] ) ] spids: [2611 2619 2669] ) (C {(cube_echo)} { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(${ VSub_Name cube_service_verb)}) (C {(cut)} {(-c1)}) (C {(tr)} {(Lit_Other '[') (a-z) (Lit_Other ']')} {(Lit_Other '[') (A-Z) (Lit_Other ']')} ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [2675 2699] ) (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(${ VSub_Name cube_service_verb)}) (C {(cut)} {(-c2-)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [2700 2712] ) (' ') ($ VSub_Number '$2') (' service') ) } ) ] spids: [16777215 2608] ) ] else_action: [(C {(cube_echo)} {(DQ ('Executed ') ($ VSub_Number '$1'))})] spids: [2719 2730] ) ] spids: [2455] ) spids: [2451 2454] ) (FuncDef name: cube_service_exists body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_command_exists)} {(systemctl)}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_service_exists_output) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(systemctl)} {(status)} {(${ VSub_Number 1)}] redirects: [ (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [2796] ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [2787 2798] ) ) } spids: [2785] ) ] spids: [2785] ) (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name cube_service_exists_output))}) (SimpleCommand words: [{(grep)} {(-l)} {(loaded)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [2818] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [2821] ) ] ) ] negated: F ) (ControlFlow token: <ControlFlow_Return return> arg_word: {($ VSub_QMark '$?')} ) ] spids: [16777215 2782] ) ] else_action: [(C {(cube_throw)} {(DQ ('Not implemented'))})] spids: [2830 2840] ) ] spids: [2760] ) spids: [2756 2759] ) (FuncDef name: cube_package body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (If arms: [ (if_arm cond: [(Sentence child:(C {(cube_command_exists)} {(dnf)}) terminator:<Op_Semi ';'>)] action: [ (C {(cube_echo)} {(DQ ('Executing dnf -y ') (${ VSub_At '@'))}) (AndOr ops: [Op_DPipe] children: [(C {(dnf)} {(-y)} {(DQ (${ VSub_At '@'))}) (C {(cube_check_return)})] ) ] spids: [16777215 2897] ) (if_arm cond: [(Sentence child:(C {(cube_command_exists)} {(yum)}) terminator:<Op_Semi ';'>)] action: [ (C {(cube_echo)} {(DQ ('Executing yum -y ') (${ VSub_At '@'))}) (AndOr ops: [Op_DPipe] children: [(C {(yum)} {(-y)} {(DQ (${ VSub_At '@'))}) (C {(cube_check_return)})] ) ] spids: [2925 2933] ) (if_arm cond: [ (Sentence child: (C {(cube_command_exists)} {(apt-get)}) terminator: <Op_Semi ';'> ) ] action: [ (C {(cube_echo)} {(DQ ('Executing apt-get -y ') (${ VSub_At '@'))}) (AndOr ops: [Op_DPipe] children: [ (SimpleCommand words: [{(apt-get)} {(-y)} {(DQ (${ VSub_At '@'))}] more_env: [ (env_pair name: DEBIAN_FRONTEND val: {(noninteractive)} spids: [2986] ) ] ) (C {(cube_check_return)}) ] ) ] spids: [2961 2969] ) ] else_action: [ (C {(cube_throw)} {(DQ ('cube_package has not implemented your operating system yet'))}) ] spids: [3004 3014] ) ] spids: [2873] ) spids: [2869 2872] ) (FuncDef name: cube_current_script_name body: (BraceGroup children:[(C {(basename)} {(DQ ($ VSub_Number '$0'))})] spids:[3038]) spids: [3034 3037] ) (FuncDef name: cube_current_script_abs_path body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_current_script_abs_path_dirname) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Sentence child: (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ ($ VSub_Number '$0'))})] ) left_token: <Left_CommandSub '$('> spids: [3078 3084] ) ) } ) terminator: <Op_Semi ';'> ) (C {(pwd)} {(-P)}) ] ) left_token: <Left_CommandSub '$('> spids: [3073 3093] ) } spids: [3072] ) ] spids: [3072] ) (C {(echo)} { (DQ (${ VSub_Name cube_current_script_abs_path_dirname) (/) (CommandSubPart command_list: (CommandList children:[(C {(cube_current_script_name)})]) left_token: <Left_CommandSub '$('> spids: [3103 3105] ) ) } ) ] spids: [3069] ) spids: [3065 3068] ) (FuncDef name: cube_file_size body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_file_exists)} {(DQ (${ VSub_Number 1))}) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(wc)} {(-c)}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(DQ (${ VSub_Number 1))} spids: [3169] ) ] ) ] spids: [16777215 3162] ) ] else_action: [ (C {(cube_throw)} {(DQ ('Could not find or read file ') (${ VSub_Number 1))}) ] spids: [3178 3191] ) ] spids: [3136] ) spids: [3132 3135] ) (FuncDef name: cube_expand_parameters body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_expand_parameters_is_bash) op: Equal rhs: {(0)} spids: [3224] ) ] spids: [3224] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (CommandSubPart command_list: (CommandList children:[(C {(cube_shell)})]) left_token: <Left_CommandSub '$('> spids: [3232 3234] ) } {(-eq)} {(${ VSub_Name POSIXCUBE_SHELL_BASH)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_expand_parameters_is_bash) op: Equal rhs: {(0)} spids: [3256] ) ] spids: [3256] ) ] spids: [16777215 3245] ) ] spids: [16777215 3264] ) (While cond: [ (Sentence child: (AndOr ops: [Op_DPipe] children: [ (SimpleCommand words: [{(read)} {(-r)} {(cube_expand_parameters_line)}] more_env: [(env_pair name:IFS val:{(SQ )} spids:[3275])] ) (C {(Lit_Other '[')} {(-n)} {(DQ (${ VSub_Name cube_expand_parameters_line))} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_expand_parameters_line_escaped) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(printf)} {(Lit_Other '%') (s)} {(DQ (${ VSub_Name cube_expand_parameters_line))} ) (C {(tr)} {(SQ <'`([$\\\\"'>)} {(SQ <'\\1\\2\\3\\4\\5\\6'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [3308 3331] ) } spids: [3307] ) ] spids: [3307] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$cube_expand_parameters_is_bash')} {(-eq)} {(1)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_expand_parameters_line_escaped) op: Equal rhs: { (BracedVarSub token: <VSub_Name cube_expand_parameters_line_escaped> suffix_op: (PatSub pat: { (SingleQuotedPart left: <Left_DollarSingleQuote "$'"> tokens: [<Char_Octal3 '\\4'>] ) ('{') } replace: {(EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{') } do_all: T do_prefix: F do_suffix: F ) spids: [3357 3368] ) } spids: [3356] ) ] spids: [3356] ) ] spids: [16777215 3353] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_expand_parameters_line_escaped) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(printf)} {(Lit_Other '%') (s)} { (DQ (${ VSub_Name cube_expand_parameters_line_escaped) ) } ) (C {(sed)} {(SQ <'s/\\([^\\x05]\\)\\x04{/\\1${/g'>)}) (C {(sed)} {(SQ <'s/^\\x04{/${/g'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [3375 3402] ) } spids: [3374] ) ] spids: [3374] ) ] spids: [3371 3405] ) (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_expand_parameters_output) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(eval)} { (DQ ("printf '%s") (Lit_Other '\\') ("n' ") (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (${ VSub_Name cube_expand_parameters_line_escaped) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [3411 3424] ) } spids: [3410] ) ] spids: [3410] ) (C {(cube_check_return)} {(DQ (${ VSub_Name cube_expand_parameters_line_escaped))} ) ] ) (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name cube_expand_parameters_output))}) (C {(tr)} {(SQ <'\\1\\2\\3\\4\\5\\6'>)} {(SQ <'`([$\\\\"'>)}) ] negated: F ) ] spids: [3300 3460] ) ) ] spids: [3215] ) spids: [3211 3214] ) (FuncDef name: cube_read_heredoc body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_read_heredoc_first) op: Equal rhs: {(1)} spids: [3493] ) ] spids: [3493] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_read_heredoc_result) op: Equal rhs: {(DQ )} spids: [3497] ) ] spids: [3497] ) (While cond: [ (Sentence child: (SimpleCommand words: [{(read)} {(-r)} {(cube_read_heredoc_line)}] more_env: [(env_pair name:IFS val:{(SQ <'\\n'>)} spids:[3504])] ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name cube_read_heredoc_first)} {(-eq)} {(1)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_read_heredoc_result) op: Equal rhs: {(DQ (${ VSub_Name cube_read_heredoc_line))} spids: [3537] ) ] spids: [3537] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_read_heredoc_first) op: Equal rhs: {(0)} spids: [3545] ) ] spids: [3545] ) ] spids: [16777215 3534] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_read_heredoc_result) op: Equal rhs: { (DQ (${ VSub_Name cube_read_heredoc_result) (${ VSub_Name POSIXCUBE_NEWLINE) (${ VSub_Name cube_read_heredoc_line) ) } spids: [3552] ) ] spids: [3552] ) ] spids: [3549 3566] ) ] spids: [3516 3569] ) ) ] spids: [3490] ) spids: [3486 3489] ) (FuncDef name: cube_set_file_contents body: (BraceGroup children: [ (C {(cube_check_numargs)} {(2)} {(DQ (${ VSub_At '@'))}) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_target_file) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [3625] ) ] spids: [3625] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_input_file) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [3634] ) ] spids: [3634] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_debug) op: Equal rhs: {(DQ (${ VSub_Name cube_set_file_contents_input_file))} spids: [3644] ) ] spids: [3644] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_needs_replace) op: Equal rhs: {(0)} spids: [3654] ) ] spids: [3654] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_input_file_needs_remove) op: Equal rhs: {(0)} spids: [3658] ) ] spids: [3658] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (C {(cube_file_exists)} {(DQ (${ VSub_Name cube_set_file_contents_input_file))} ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (C {(cube_throw)} { (DQ ('Could not find or read input ') (${ VSub_Name cube_set_file_contents_input_file) ) } ) ] spids: [16777215 3678] ) ] spids: [16777215 3691] ) (C {(cube_ensure_directory)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(dirname)} {(DQ (${ VSub_Name cube_set_file_contents_target_file))}) ] ) left_token: <Left_CommandSub '$('> spids: [3699 3707] ) ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_input_file_is_template) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ (${ VSub_Name cube_set_file_contents_input_file))} {(Lit_Other ':')} {(SQ <'.*\\.template$'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [3714 3728] ) } spids: [3713] ) ] spids: [3713] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name cube_set_file_contents_input_file_is_template)} {(-ne)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_input_file_original) op: Equal rhs: {(DQ (${ VSub_Name cube_set_file_contents_input_file))} spids: [3751] ) ] spids: [3751] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_input_file) op: Equal rhs: {(DQ (${ VSub_Name cube_set_file_contents_input_file) (.tmp))} spids: [3759] ) ] spids: [3759] ) (C {(cube_echo)} { (DQ ('Expanding parameters of ') (${ VSub_Name cube_set_file_contents_input_file_original) ) } ) (AndOr ops: [Op_DPipe] children: [ (SimpleCommand words: [{(cube_expand_parameters)}] redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(DQ (${ VSub_Name cube_set_file_contents_input_file_original))} spids: [3811] ) (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name cube_set_file_contents_input_file))} spids: [3819] ) ] ) (C {(cube_check_return)}) ] ) (C {(cube_echo)} {(DQ ('Expansion complete'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_input_file_needs_remove) op: Equal rhs: {(1)} spids: [3851] ) ] spids: [3851] ) ] spids: [16777215 3746] ) ] spids: [16777215 3855] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_file_exists)} {(DQ (${ VSub_Name cube_set_file_contents_target_file))}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_target_file_size) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_file_size)} {(DQ (${ VSub_Name cube_set_file_contents_target_file))} ) ] ) left_token: <Left_CommandSub '$('> spids: [3882 3890] ) } spids: [3881] ) ] spids: [3881] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_input_file_size) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_file_size)} {(DQ (${ VSub_Name cube_set_file_contents_input_file))} ) ] ) left_token: <Left_CommandSub '$('> spids: [3894 3902] ) } spids: [3893] ) ] spids: [3893] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name POSIXCUBE_DEBUG)} {(-eq)} {(1)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(cube_echo)} { (DQ ('Target file ') (${ VSub_Name cube_set_file_contents_target_file) (' exists. Target size: ') (${ VSub_Name cube_set_file_contents_target_file_size) (', source size: ') (${ VSub_Name cube_set_file_contents_input_file_size) ) } ) ] spids: [16777215 3922] ) ] spids: [16777215 3943] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name cube_set_file_contents_target_file_size)} {(-eq)} {(${ VSub_Name cube_set_file_contents_input_file_size)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_target_file_cksum) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(cksum)} { (DQ (${ VSub_Name cube_set_file_contents_target_file ) ) } ) (C {(awk)} {(SQ <'{print $1}'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [3974 3990] ) } spids: [3973] ) ] spids: [3973] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_input_file_cksum) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(cksum)} { (DQ (${ VSub_Name cube_set_file_contents_input_file ) ) } ) (C {(awk)} {(SQ <'{print $1}'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [3994 4010] ) } spids: [3993] ) ] spids: [3993] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name POSIXCUBE_DEBUG)} {(-eq)} {(1)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(cube_echo)} { (DQ ('Target cksum: ') (${ VSub_Name cube_set_file_contents_target_file_cksum) (', source cksum: ') (${ VSub_Name cube_set_file_contents_input_file_cksum) ) } ) ] spids: [16777215 4029] ) ] spids: [16777215 4046] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (${ VSub_Name cube_set_file_contents_target_file_cksum) ) } {(KW_Bang '!') (Lit_Other '=')} {(DQ (${ VSub_Name cube_set_file_contents_input_file_cksum))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_needs_replace) op: Equal rhs: {(1)} spids: [4076] ) ] spids: [4076] ) ] spids: [16777215 4073] ) ] spids: [16777215 4080] ) ] spids: [16777215 3965] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_needs_replace) op: Equal rhs: {(1)} spids: [4086] ) ] spids: [4086] ) ] spids: [4083 4090] ) ] spids: [16777215 3872] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_needs_replace) op: Equal rhs: {(1)} spids: [4096] ) ] spids: [4096] ) ] spids: [4093 4100] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name cube_set_file_contents_needs_replace)} {(-eq)} {(1)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(cube_echo)} { (DQ ('Updating file contents of ') (${ VSub_Name cube_set_file_contents_target_file) (' with ') (${ VSub_Name cube_set_file_contents_debug) ) } ) (AndOr ops: [Op_DPipe] children: [ (C {(cp)} {(DQ (${ VSub_Name cube_set_file_contents_input_file))} {(DQ (${ VSub_Name cube_set_file_contents_target_file))} ) (C {(cube_check_return)}) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name cube_set_file_contents_input_file_needs_remove)} {(-eq)} {(1)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(rm)} {(-f)} {(DQ (${ VSub_Name cube_set_file_contents_input_file))}) (C {(cube_check_return)}) ] ) ] spids: [16777215 4172] ) ] spids: [16777215 4190] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [16777215 4120] ) ] else_action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name cube_set_file_contents_input_file_needs_remove)} {(-eq)} {(1)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(rm)} {(-f)} {(DQ (${ VSub_Name cube_set_file_contents_input_file))}) (C {(cube_check_return)}) ] ) ] spids: [16777215 4217] ) ] spids: [16777215 4235] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [4198 4243] ) ] spids: [3611] ) spids: [3607 3610] ) (FuncDef name: cube_random_number body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (Pipeline children: [ (C {(echo)} {(DQ )}) (C {(awk)} {(DQ ('{ srand(); print int(') (${ VSub_Number 1) (' * rand()) + 1; }'))}) ] negated: F ) ] spids: [4273] ) spids: [4269 4272] ) (FuncDef name: cube_tmpdir body: (BraceGroup children:[(C {(echo)} {(DQ (/tmp/))})] spids:[4326]) spids: [4322 4325] ) (FuncDef name: cube_set_file_contents_string body: (BraceGroup children: [ (C {(cube_check_numargs)} {(2)} {(DQ (${ VSub_At '@'))}) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_target_file) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [4383] ) ] spids: [4383] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_tmp) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(cube_tmpdir)})]) left_token: <Left_CommandSub '$('> spids: [4396 4398] ) (/tmpcontents_) (CommandSubPart command_list: (CommandList children:[(C {(cube_random_number)} {(10000)})]) left_token: <Left_CommandSub '$('> spids: [4400 4404] ) (.template) ) } spids: [4394] ) ] spids: [4394] ) (SimpleCommand words: [{(echo)} {(DQ (${ VSub_At '@'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name cube_set_file_contents_tmp))} spids: [4417] ) ] ) (C {(cube_set_file_contents)} {(DQ (${ VSub_Name cube_set_file_contents_target_file))} {(DQ (${ VSub_Name cube_set_file_contents_tmp))} {(DQ ('from string'))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [4445] ) ] spids: [4445] ) (C {(rm)} {(DQ (${ VSub_Name cube_set_file_contents_tmp))}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name cube_set_file_contents_result)} ) ] spids: [4369] ) spids: [4365 4368] ) (FuncDef name: cube_readlink body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_readlink_target) op: Equal rhs: {($ VSub_Number '$1')} spids: [4531] ) ] spids: [4531] ) (AndOr ops: [Op_DAmp] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_readlink_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (AndOr ops: [Op_DAmp] children: [ (C {(cd)} {(-P)} {(--)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(dirname)} {(--)} {(DQ (${ VSub_Name cube_readlink_target))} ) ] ) left_token: <Left_CommandSub '$('> spids: [4544 4554] ) ) } ) (C {(pwd)} {(-P)}) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [4536 4562] ) } spids: [4535] ) ] spids: [4535] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_readlink_path) op: Equal rhs: {(${ VSub_Name cube_readlink_path) (/) (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(--)} {(DQ (${ VSub_Name cube_readlink_target))}) ] ) left_token: <Left_CommandSub '$('> spids: [4571 4581] ) } spids: [4566] ) ] spids: [4566] ) ] ) (While cond: [ (Sentence child: (C {(Lit_Other '[')} {(-h)} {(DQ (${ VSub_Name cube_readlink_path))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_readlink_dir) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(dirname)} {(--)} {(DQ (${ VSub_Name cube_readlink_path))}) ] ) left_token: <Left_CommandSub '$('> spids: [4605 4615] ) } spids: [4604] ) ] spids: [4604] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_readlink_sym) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(readlink)} {(DQ (${ VSub_Name cube_readlink_path))})] ) left_token: <Left_CommandSub '$('> spids: [4619 4627] ) } spids: [4618] ) ] spids: [4618] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_readlink_path) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(cd)} {(DQ (${ VSub_Name cube_readlink_dir))}) (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(dirname)} {(--)} {(DQ (${ VSub_Name cube_readlink_sym))} ) ] ) left_token: <Left_CommandSub '$('> spids: [4645 4655] ) ) } ) (C {(pwd)}) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [4631 4661] ) (/) (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(--)} {(DQ (${ VSub_Name cube_readlink_sym))}) ] ) left_token: <Left_CommandSub '$('> spids: [4663 4673] ) } spids: [4630] ) ] spids: [4630] ) ] spids: [4601 4676] ) ) (C {(echo)} {(${ VSub_Name cube_readlink_path)}) ] spids: [4492] ) spids: [4488 4491] ) (FuncDef name: cube_total_memory body: (BraceGroup children: [ (Case to_match: {(DQ (${ VSub_Number 1))} arms: [ (case_arm pat_list: [{(kb)} {(KB)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_total_memory_divisor) op: Equal rhs: {(1024)} spids: [4739] ) ] spids: [4739] ) ] spids: [4733 4736 4743 16777215] ) (case_arm pat_list: [{(mb)} {(MB)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_total_memory_divisor) op: Equal rhs: {(1048576)} spids: [4752] ) ] spids: [4752] ) ] spids: [4746 4749 4756 16777215] ) (case_arm pat_list: [{(gb)} {(GB)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_total_memory_divisor) op: Equal rhs: {(1073741824)} spids: [4765] ) ] spids: [4765] ) ] spids: [4759 4762 4769 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_total_memory_divisor) op: Equal rhs: {(1)} spids: [4776] ) ] spids: [4776] ) ] spids: [4772 4773 4780 16777215] ) ] spids: [4722 4730 4783] ) (C {(echo)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Slash left: (ArithBinary op_id: Arith_Star left: (ArithWord w: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(grep)} {(DQ ('^MemTotal:'))} {(/proc/meminfo)}) (C {(awk)} {(SQ <'{print $2}'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [4790 4806] ) } ) right: (ArithWord w:{(Lit_Digits 1024)}) ) right: (ArithWord w:{(${ VSub_Name cube_total_memory_divisor)}) ) spids: [4788 4815] ) } ) ] spids: [4719] ) spids: [4715 4718] ) (FuncDef name: cube_ensure_directory body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_ensure_directory_result) op: Equal rhs: {(1)} spids: [4871] ) ] spids: [4871] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [(C {(cube_dir_exists)} {(DQ (${ VSub_Number 1))})] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(mkdir)} {(-p)} {(DQ (${ VSub_Number 1))}) (C {(cube_check_return)}) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_ensure_directory_result) op: Equal rhs: {(0)} spids: [4908] ) ] spids: [4908] ) (C {(cube_echo)} {(DQ ('Created directory ') (${ VSub_Number 1))}) ] spids: [16777215 4890] ) ] spids: [16777215 4922] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 2))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(chmod)} {(${ VSub_Number 2)} {(DQ (${ VSub_Number 1))}) (C {(cube_check_return)}) ] ) ] spids: [16777215 4944] ) ] spids: [16777215 4964] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 3))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(chown)} {(${ VSub_Number 3)} {(DQ (${ VSub_Number 1))}) (C {(cube_check_return)}) ] ) ] spids: [16777215 4986] ) ] spids: [16777215 5006] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 4))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(chgrp)} {(${ VSub_Number 4)} {(DQ (${ VSub_Number 1))}) (C {(cube_check_return)}) ] ) ] spids: [16777215 5028] ) ] spids: [16777215 5048] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name cube_ensure_directory_result)} ) ] spids: [4857] ) spids: [4853 4856] ) (FuncDef name: cube_ensure_file body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_ensure_file_result) op: Equal rhs: {(1)} spids: [5113] ) ] spids: [5113] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [(C {(cube_file_exists)} {(DQ (${ VSub_Number 1))})] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (C {(cube_ensure_directory)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {(DQ (${ VSub_Number 1))})] ) left_token: <Left_CommandSub '$('> spids: [5140 5148] ) ) } {($ VSub_Number '$2')} {($ VSub_Number '$3')} {($ VSub_Number '$4')} ) (AndOr ops: [Op_DPipe] children: [(C {(touch)} {(DQ (${ VSub_Number 1))}) (C {(cube_check_return)})] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_ensure_file_result) op: Equal rhs: {(0)} spids: [5173] ) ] spids: [5173] ) (C {(cube_echo)} {(DQ ('Created file ') (${ VSub_Number 1))}) ] spids: [16777215 5132] ) ] spids: [16777215 5187] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 2))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(chmod)} {(${ VSub_Number 2)} {(DQ (${ VSub_Number 1))}) (C {(cube_check_return)}) ] ) ] spids: [16777215 5209] ) ] spids: [16777215 5229] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 3))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(chown)} {(${ VSub_Number 3)} {(DQ (${ VSub_Number 1))}) (C {(cube_check_return)}) ] ) ] spids: [16777215 5251] ) ] spids: [16777215 5271] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 4))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(chgrp)} {(${ VSub_Number 4)} {(DQ (${ VSub_Number 1))}) (C {(cube_check_return)}) ] ) ] spids: [16777215 5293] ) ] spids: [16777215 5313] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name cube_ensure_file_result)} ) ] spids: [5099] ) spids: [5095 5098] ) (FuncDef name: cube_pushd body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_command_exists)} {(pushd)}) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [(C {(pushd)} {(DQ (${ VSub_At '@'))}) (C {(cube_check_return)})] ) ] spids: [16777215 5375] ) ] else_action: [(C {(cube_throw)} {(DQ ('TODO: Not implemented'))})] spids: [5391 5401] ) ] spids: [5351] ) spids: [5347 5350] ) (FuncDef name: cube_popd body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_command_exists)} {(popd)}) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [(C {(popd)} {(DQ (${ VSub_At '@'))}) (C {(cube_check_return)})] ) ] spids: [16777215 5436] ) ] else_action: [(C {(cube_throw)} {(DQ ('TODO: Not implemented'))})] spids: [5452 5462] ) ] spids: [5425] ) spids: [5421 5424] ) (FuncDef name: cube_has_role body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (ForEach iter_name: cube_has_role_name iter_words: [{(${ VSub_Name cubevar_api_roles)}] do_arg_iter: F body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name cube_has_role_name))} {(Lit_Other '=')} {(DQ (${ VSub_Number 1))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [16777215 5543] ) ] spids: [16777215 5551] ) ] spids: [5519 5554] ) spids: [5513 5517] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [5492] ) spids: [5488 5491] ) (FuncDef name: cube_file_contains body: (BraceGroup children: [ (C {(cube_check_numargs)} {(2)} {(DQ (${ VSub_At '@'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_file_contains_grep_output) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(grep)} {(-l)} {(DQ (${ VSub_Number 2))} {(DQ (${ VSub_Number 1))}) ] ) left_token: <Left_CommandSub '$('> spids: [5614 5630] ) ) } spids: [5612] ) ] spids: [5612] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_file_contains_grep_results) op: Equal rhs: {($ VSub_QMark '$?')} spids: [5634] ) ] spids: [5634] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name cube_file_contains_grep_results)} {(-eq)} {(2)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(cube_throw)} {(DQ (${ VSub_Name cube_file_contains_grep_output))})] spids: [16777215 5655] ) ] else_action: [ (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name cube_file_contains_grep_results)} ) ] spids: [5667 5677] ) ] spids: [5592] ) spids: [5588 5591] ) (FuncDef name: cube_stdin_contains body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_stdin_contains_output) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(grep)} {(-l)} {(DQ (${ VSub_Number 1))} {(-)})] ) left_token: <Left_CommandSub '$('> spids: [5722 5734] ) } spids: [5721] ) ] spids: [5721] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_stdin_contains_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [5737] ) ] spids: [5737] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name cube_stdin_contains_result)} {(-eq)} {(2)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(cube_throw)} {(DQ (${ VSub_Name cube_stdin_contains_output))})] spids: [16777215 5756] ) ] else_action: [ (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name cube_stdin_contains_result)} ) ] spids: [5768 5778] ) ] spids: [5707] ) spids: [5703 5706] ) (FuncDef name: cube_interface_ipv4_address body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (AndOr ops: [Op_DPipe] children: [ (Pipeline children: [ (C {(ip)} {(-4)} {(-o)} {(address)} {(show)} {(dev)} {(${ VSub_Number 1)}) (C {(head)} {(-1)}) (C {(awk)} {(SQ <'{print $4}'>)}) (C {(sed)} {(SQ <'s/\\/.*$//g'>)}) ] negated: F ) (C {(cube_check_return)}) ] ) ] spids: [5808] ) spids: [5804 5807] ) (FuncDef name: cube_interface_ipv6_address body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (AndOr ops: [Op_DPipe] children: [ (Pipeline children: [ (C {(ip)} {(-6)} {(-o)} {(address)} {(show)} {(dev)} {(${ VSub_Number 1)}) (C {(head)} {(-1)}) (C {(awk)} {(SQ <'{print $4}'>)}) (C {(sed)} {(SQ <'s/\\/.*$//g'>)}) ] negated: F ) (C {(cube_check_return)}) ] ) ] spids: [5892] ) spids: [5888 5891] ) (FuncDef name: cube_prompt body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (While cond: [(Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (C {(printf)} {(DQ (${ VSub_Number 1) (' (y/N)? '))}) (AndOr ops: [Op_DPipe] children: [(C {(read)} {(cube_prompt_response)}) (C {(cube_check_return)})] ) (Case to_match: {(DQ (${ VSub_Name cube_prompt_response))} arms: [ (case_arm pat_list: [{(Lit_Other '[') (Yy) (Lit_Other ']') (Lit_Other '*')}] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [6031 6035 6043 16777215] ) (case_arm pat_list: [{(DQ )} {(Lit_Other '[') (Nn) (Lit_Other ']') (Lit_Other '*')}] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] spids: [16777215 6053 6061 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(echo)} {(DQ ('Please answer yes or no.'))})] spids: [6064 6065 6075 16777215] ) ] spids: [6020 6028 6078] ) ] spids: [5998 6081] ) ) ] spids: [5979] ) spids: [5975 5978] ) (FuncDef name: cube_hostname body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 1))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [(C {(uname)} {(-n)}) (C {(cube_check_return)})] ) ] spids: [16777215 6132] ) ] else_action: [ (AndOr ops: [Op_DPipe] children: [ (Pipeline children: [(C {(uname)} {(-n)}) (C {(sed)} {(SQ <'s/\\..*$//g'>)})] negated: F ) (C {(cube_check_return)}) ] ) ] spids: [6144 6164] ) ] spids: [6111] ) spids: [6107 6110] ) (FuncDef name: cube_user_exists body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (SimpleCommand words: [{(id)} {(-u)} {(DQ (${ VSub_Number 1))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [6218] ) (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[6221]) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{($ VSub_QMark '$?')}) ] spids: [6194] ) spids: [6190 6193] ) (FuncDef name: cube_create_user body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (AndOr ops: [Op_DPipe] children: [(C {(useradd)} {(DQ (${ VSub_Number 1))}) (C {(cube_check_return)})] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 2))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(usermod)} {(-s)} {(DQ (${ VSub_Number 2))} {(DQ (${ VSub_Number 1))}) (C {(cube_check_return)}) ] ) ] spids: [16777215 6313] ) ] spids: [16777215 6337] ) ] spids: [6263] ) spids: [6259 6262] ) (FuncDef name: cube_group_exists body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (C {(cube_file_contains)} {(/etc/group)} {(DQ ('^') (${ VSub_Number 1) (':'))}) ] spids: [6367] ) spids: [6363 6366] ) (FuncDef name: cube_create_group body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (AndOr ops: [Op_DPipe] children: [(C {(groupadd)} {(DQ (${ VSub_Number 1))}) (C {(cube_check_return)})] ) ] spids: [6421] ) spids: [6417 6420] ) (FuncDef name: cube_group_contains_user body: (BraceGroup children: [ (C {(cube_check_numargs)} {(2)} {(DQ (${ VSub_At '@'))}) (ForEach iter_name: cube_group_contains_user iter_words: [ { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(groups)} {(DQ (${ VSub_Number 2))}) (C {(sed)} {(DQ (s/) (${ VSub_Number 2) (' : //g'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [6502 6522] ) } ] do_arg_iter: F body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name cube_group_contains_user))} {(Lit_Other '=')} {(DQ (${ VSub_Number 1))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [16777215 6549] ) ] spids: [16777215 6557] ) ] spids: [6525 6560] ) spids: [6501 6523] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [6480] ) spids: [6476 6479] ) (FuncDef name: cube_add_group_user body: (BraceGroup children: [ (C {(cube_check_numargs)} {(2)} {(DQ (${ VSub_At '@'))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Number 3))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(usermod)} {(-a)} {(-G)} {(DQ (${ VSub_Number 1))} {(DQ (${ VSub_Number 2))}) ] spids: [16777215 6638] ) ] else_action: [(C {(usermod)} {(-g)} {(DQ (${ VSub_Number 1))} {(DQ (${ VSub_Number 2))})] spids: [6660 6680] ) ] spids: [6604] ) spids: [6600 6603] ) (FuncDef name: cube_include body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_include_name) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 1> suffix_op: (StringUnary op_id:VOp1_DPercent arg_word:{(Lit_Slash /)}) spids: [6728 6732] ) ) } spids: [6726] ) ] spids: [6726] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-d)} {(DQ (../) (${ VSub_Name cube_include_name))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_include_name_base) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(DQ (${ VSub_Name cube_include_name))} {(.sh)}) ] ) left_token: <Left_CommandSub '$('> spids: [6756 6766] ) } spids: [6755] ) ] spids: [6755] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} { (DQ (../) (${ VSub_Name cube_include_name) (/) (${ VSub_Name cube_include_name_base) (.sh) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(cube_echo)} {(DQ ('Including ') (${ VSub_Name cube_include_name) (' cube...'))} ) (C {(.)} { (DQ (../) (${ VSub_Name cube_include_name) (/) (${ VSub_Name cube_include_name_base) (.sh) ) } ) ] spids: [16777215 6790] ) ] else_action: [ (C {(cube_throw)} { (DQ ('Cannot read ') (${ VSub_Name cube_include_name) (/) (${ VSub_Name cube_include_name_base) (.sh) ) } ) ] spids: [6819 6837] ) ] spids: [16777215 6752] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(DQ (../) (${ VSub_Name cube_include_name))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(cube_echo)} {(DQ ('Including ') (${ VSub_Name cube_include_name) (' cube...'))}) (C {(.)} {(DQ (../) (${ VSub_Name cube_include_name))}) ] spids: [6840 6856] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Name cube_include_name) (.sh))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(cube_echo)} {(DQ ('Including ') (${ VSub_Name cube_include_name) (' cube...'))}) (C {(.)} {(DQ (../) (${ VSub_Name cube_include_name) (.sh))}) ] spids: [6880 6896] ) ] else_action: [ (C {(cube_throw)} { (DQ ('Cube ') (${ VSub_Name cube_include_name) (' not found (did you upload it with -i ') (${ VSub_Name cube_include_name) (' ?).') ) } ) ] spids: [6921 6939] ) ] spids: [6710] ) spids: [6706 6709] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cubevar_api_post_restart) op: Equal rhs: {(DQ )} spids: [6947] ) ] spids: [6947] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:cubevar_api_roles) op:Equal rhs:{(DQ )} spids:[6952])] spids: [6952] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name POSIXCUBE_APIS_ONLY))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_debug) op:Equal rhs:{(0)} spids:[7001])] spids: [7001] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_quiet) op:Equal rhs:{(0)} spids:[7005])] spids: [7005] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_skip_init) op:Equal rhs:{(0)} spids:[7009])] spids: [7009] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_keep_exec) op:Equal rhs:{(0)} spids:[7013])] spids: [7013] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_skip_host_errors) op: Equal rhs: {(0)} spids: [7017] ) ] spids: [7017] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_hosts) op:Equal rhs:{(DQ )} spids:[7021])] spids: [7021] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_cubes) op:Equal rhs:{(DQ )} spids:[7026])] spids: [7026] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_include_cubes) op: Equal rhs: {(DQ )} spids: [7031] ) ] spids: [7031] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts) op: Equal rhs: {(DQ )} spids: [7036] ) ] spids: [7036] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts_password) op: Equal rhs: {(DQ )} spids: [7041] ) ] spids: [7041] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_user) op: Equal rhs: {(DQ (${ VSub_Name USER))} spids: [7046] ) ] spids: [7046] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cubedir) op: Equal rhs: {(DQ ('~/posixcubes/'))} spids: [7054] ) ] spids: [7054] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_roles) op:Equal rhs:{(DQ )} spids:[7060])] spids: [7060] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_options) op:Equal rhs:{(DQ )} spids:[7065])] spids: [7065] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_specfile) op: Equal rhs: {(DQ (./cubespecs.ini))} spids: [7070] ) ] spids: [7070] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_parallel) op:Equal rhs:{(0)} spids:[7076])] spids: [7076] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_async_cubes) op: Equal rhs: {(0)} spids: [7080] ) ] spids: [7080] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_default_envars) op: Equal rhs: {(DQ ('envars*sh envars*sh.enc'))} spids: [7084] ) ] spids: [7084] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (CommandSubPart command_list: (CommandList children:[(C {(cube_shell)})]) left_token: <Left_CommandSub '$('> spids: [7096 7098] ) } {(-eq)} {(${ VSub_Name POSIXCUBE_SHELL_BASH)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_parallel) op: Equal rhs: {(64)} spids: [7112] ) ] spids: [7112] ) ] spids: [16777215 7109] ) ] spids: [16777215 7116] ) (FuncDef name: p666_show_version body: (BraceGroup children: [ (C {(p666_printf)} { (DQ ('posixcube.sh version ') (${ VSub_Name POSIXCUBE_VERSION) (Lit_Other '\\') (n) ) } ) ] spids: [7124] ) spids: [7120 7123] ) (FuncDef name: p666_printf body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_printf_str) op: Equal rhs: {($ VSub_Number '$1')} spids: [7150] ) ] spids: [7150] ) (C {(shift)}) (C {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [7161 7163] ) ('] ') (${ VSub_Name p666_printf_str) ) } {(DQ (${ VSub_At '@'))} ) ] spids: [7147] ) spids: [7143 7146] ) (FuncDef name: p666_printf_error body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_printf_str) op: Equal rhs: {($ VSub_Number '$1')} spids: [7188] ) ] spids: [7188] ) (C {(shift)}) (SimpleCommand words: [ {(printf)} { (DQ (Lit_Other '\\') ('n[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [7200 7202] ) ('] ') (${ VSub_Name POSIXCUBE_COLOR_RED) (Error) (${ VSub_Name POSIXCUBE_COLOR_RESET) (': ') (${ VSub_Name p666_printf_str) (Lit_Other '\\') (n) (Lit_Other '\\') (n) ) } {(DQ (${ VSub_At '@'))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[7227])] ) ] spids: [7185] ) spids: [7181 7184] ) (FuncDef name: p666_exit body: (BraceGroup children: [ (ForEach iter_name: p666_envar_script iter_words: [{(${ VSub_Name p666_envar_scripts)}] do_arg_iter: F body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_script_enc_matches) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(${ VSub_Name p666_envar_script)} {(Lit_Other ':')} {(SQ <'.*\\.dec$'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [7258 7270] ) } spids: [7257] ) ] spids: [7257] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_envar_script_enc_matches)} {(-ne)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(rm)} {(DQ (${ VSub_Name p666_envar_script))}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [7307] ) ] ) ] spids: [16777215 7288] ) ] spids: [16777215 7311] ) ] spids: [7254 7314] ) spids: [7248 7252] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_keep_exec)} {(-eq)} {(0)} {(Lit_Other ']')} ) (SimpleCommand words: [{(rm)} {(-f)} {(DQ (${ VSub_Name p666_script))}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [7342] ) ] ) ] ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(${ VSub_Number 1)} ) ] spids: [7240] ) spids: [7236 7239] ) (FuncDef name: p666_install body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_func_result) op: Equal rhs: {(0)} spids: [7366] ) ] spids: [7366] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-d)} {(DQ (/etc/bash_completion.d/))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_autocomplete_file) op: Equal rhs: {(/etc/bash_completion.d/posixcube_completion.sh)} spids: [7386] ) ] spids: [7386] ) (Pipeline children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: {('_posixcube_complete() {\n') (' COMPREPLY=()\n') (' cur="${COMP_WORDS[COMP_CWORD]}"\n') (' prev="${COMP_WORDS[COMP_CWORD-1]}"\n') (' case "${prev}" in\n') (' \\-h)\n') (' p666_host_list=$({ \n') (' for c in /etc/ssh_config /etc/ssh/ssh_config ~/.ssh/config\n') ( " do [ -r $c ] && sed -n -e 's/^Host[[:space:]]//p' -e 's/^[[:space:]]*HostName[[:space:]]//p' $c\n" ) (' done\n') ( ' for k in /etc/ssh_known_hosts /etc/ssh/ssh_known_hosts ~/.ssh/known_hosts\n' ) (" do [ -r $k ] && egrep -v '^[#\\[]' $k|cut -f 1 -d ' '|sed -e 's/[,:].*//g'\n") (' done\n') (" sed -n -e 's/^[0-9][0-9\\.]*//p' /etc/hosts; }|tr ' ' '\\n'|grep -v '*')\n") ( ' COMPREPLY=( $(compgen -W "${p666_host_list}" -- $cur))\n' ) (' ;;\n') (' \\-z)\n') (' p666_complete_specs="$(sed \'s/=.*//g\' cubespecs.ini)"\n') ( ' COMPREPLY=( $(compgen -W "${p666_complete_specs}" -- $cur))\n' ) (' ;;\n') (' *)\n') (' ;;\n') (' esac\n') (' return 0\n') ('}\n') ( 'complete -o default -F _posixcube_complete posixcube.sh\n' ) } do_expansion: False here_end: HEREDOC was_filled: T spids: [7404] ) ] ) (SimpleCommand words: [{(tee)} {(${ VSub_Name p666_autocomplete_file)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [7417] ) ] ) ] negated: F ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_func_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [7423] ) ] spids: [7423] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_func_result)} {(-eq)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(chmod)} {(Lit_Other '+') (x)} {(${ VSub_Name p666_autocomplete_file)} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_func_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [7455] ) ] spids: [7455] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_func_result)} {(-eq)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(.)} {(${ VSub_Name p666_autocomplete_file)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_func_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [7484] ) ] spids: [7484] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_func_result)} {(-eq)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(p666_printf)} { (DQ ( 'Installed Bash programmable completion script into ' ) (${ VSub_Name p666_autocomplete_file) (Lit_Other '\\') (n) ) } ) ] spids: [16777215 7503] ) ] else_action: [ (C {(p666_printf)} { (DQ ('Could not execute ') (${ VSub_Name p666_autocomplete_file) (Lit_Other '\\') (n) ) } ) ] spids: [7518 7533] ) ] spids: [16777215 7474] ) ] else_action: [ (C {(p666_printf)} { (DQ ('Could not chmod +x ') (${ VSub_Name p666_autocomplete_file) (Lit_Other '\\') (n) ) } ) ] spids: [7536 7551] ) ] spids: [16777215 7442] ) ] else_action: [ (C {(p666_printf)} { (DQ ('Could not create ') (${ VSub_Name p666_autocomplete_file) (Lit_Other '\\') (n) ) } ) (C {(p666_printf)} { (DQ ('You may need to try with sudo. For example:') (Lit_Other '\\') (n) ) } ) (C {(p666_printf)} { (DQ (' sudo ') (CommandSubPart command_list: (CommandList children: [(C {(cube_current_script_abs_path)})] ) left_token: <Left_CommandSub '$('> spids: [7582 7584] ) (' -b && . ') (${ VSub_Name p666_autocomplete_file) (Lit_Other '\\') (n) ) } ) (C {(p666_printf)} { (DQ ( 'You only need to source the command the first time. Subsequent shells will automatically source it.' ) (Lit_Other '\\') (n) ) } ) ] spids: [7554 7603] ) ] spids: [16777215 7383] ) ] else_action: [ (C {(p666_printf)} { (DQ ( 'No directory /etc/bash_completion.d/ found, skipping Bash programmable completion installation.' ) (Lit_Other '\\') (n) ) } ) ] spids: [7606 7618] ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(${ VSub_Name p666_func_result)} ) ] spids: [7363] ) spids: [7359 7362] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_all_hosts) op: Equal rhs: {(DQ )} spids: [7632] ) ] spids: [7632] ) (FuncDef name: p666_process_hostname body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_hostname_wildcard) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ (${ VSub_Number 1))} {(Lit_Other ':')} {(SQ <'.*\\*.*'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [7646 7660] ) } spids: [7645] ) ] spids: [7645] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_hostname_wildcard)} {(-ne)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_all_hosts))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_all_hosts) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (BraceGroup children: [ (ForEach iter_name: c iter_words: [ {(/etc/ssh_config)} {(/etc/ssh/ssh_config)} {(TildeSubPart prefix:'') (/.ssh/config) } ] do_arg_iter: F body: (DoGroup children: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-r)} {($ VSub_Name '$c')} {(Lit_Other ']')} ) (C {(sed)} {(-n)} {(-e)} { (SQ < 's/^Host[[:space:]]//p' > ) } {(-e)} {(SQ <'s/^[[:space:]]*HostName[[:space:]]//p'>)} {($ VSub_Name '$c')} ) ] ) ] spids: [7728 7759] ) spids: [7719 16777215] ) (ForEach iter_name: k iter_words: [ {(/etc/ssh_known_hosts)} {(/etc/ssh/ssh_known_hosts)} {(TildeSubPart prefix:'') (/.ssh/known_hosts) } ] do_arg_iter: F body: (DoGroup children: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-r)} {($ VSub_Name '$k')} {(Lit_Other ']')} ) (Pipeline children: [ (C {(egrep)} {(-v)} {(SQ <'^[#\\[]'>)} {($ VSub_Name '$k')} ) (C {(cut)} {(-f)} {(1)} {(-d)} {(SQ <' '>)} ) (C {(sed)} {(-e)} { (SQ <'s/[,:].*//g'>) } ) ] negated: F ) ] ) ] spids: [7776 7819] ) spids: [7767 16777215] ) (Sentence child: (C {(sed)} {(-n)} {(-e)} {(SQ <'s/^[0-9][0-9\\.]*//p'>)} {(/etc/hosts)} ) terminator: <Op_Semi ';'> ) ] spids: [7710] ) (C {(tr)} {(SQ <'\\n'>)} {(SQ <' '>)}) (C {(grep)} {(-v)} {(SQ <'*'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [7709 7854] ) } spids: [7708] ) ] spids: [7708] ) ] spids: [16777215 7705] ) ] spids: [16777215 7857] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_process_hostname_search) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(printf)} {(DQ (${ VSub_Number 1))}) (C {(sed)} {(SQ <'s/\\*/\\.\\*/g'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [7863 7879] ) } spids: [7862] ) ] spids: [7862] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_process_hostname_list) op: Equal rhs: {(DQ )} spids: [7884] ) ] spids: [7884] ) (ForEach iter_name: p666_all_host iter_words: [{(${ VSub_Name p666_all_hosts)}] do_arg_iter: F body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_all_host_match) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(${ VSub_Name p666_all_host)} {(Lit_Other ':')} {(${ VSub_Name p666_process_hostname_search)} ) ] ) left_token: <Left_CommandSub '$('> spids: [7904 7916] ) } spids: [7903] ) ] spids: [7903] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_all_host_match)} {(-ne)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_process_hostname_list) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_append_str)} { (DQ (${ VSub_Name p666_process_hostname_list ) ) } {(DQ (${ VSub_Name p666_all_host))} ) ] ) left_token: <Left_CommandSub '$('> spids: [7938 7952] ) } spids: [7937] ) ] spids: [7937] ) ] spids: [16777215 7934] ) ] spids: [16777215 7955] ) ] spids: [7900 7958] ) spids: [7894 7898] ) (C {(echo)} {(DQ (${ VSub_Name p666_process_hostname_list))}) ] spids: [16777215 7678] ) ] else_action: [(C {(echo)} {(DQ (${ VSub_Number 1))})] spids: [7970 7982] ) ] spids: [7642] ) spids: [7638 7641] ) (FuncDef name: p666_process_options body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:OPTIND) op:Equal rhs:{(1)} spids:[8001])] spids: [8001] ) (While cond: [ (Sentence child: (C {(getopts)} {(DQ ('?vdqbskyah:u:c:e:p:w:r:o:z:i:'))} {(p666_opt)} {(DQ (${ VSub_At '@'))} ) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (Case to_match: {(DQ ($ VSub_Name '$p666_opt'))} arms: [ (case_arm pat_list: [{(EscapedLiteralPart token:<Lit_EscapedChar '\\?'>)}] action: [(C {(p666_show_usage)})] spids: [8039 8040 8046 16777215] ) (case_arm pat_list: [{(v)}] action: [ (C {(p666_show_version)}) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [8049 8050 8061 16777215] ) (case_arm pat_list: [{(d)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_debug) op: Equal rhs: {(1)} spids: [8068] ) ] spids: [8068] ) ] spids: [8064 8065 8072 16777215] ) (case_arm pat_list: [{(q)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_quiet) op: Equal rhs: {(1)} spids: [8079] ) ] spids: [8079] ) ] spids: [8075 8076 8083 16777215] ) (case_arm pat_list: [{(s)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_skip_init) op: Equal rhs: {(1)} spids: [8090] ) ] spids: [8090] ) ] spids: [8086 8087 8094 16777215] ) (case_arm pat_list: [{(k)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_keep_exec) op: Equal rhs: {(1)} spids: [8101] ) ] spids: [8101] ) ] spids: [8097 8098 8105 16777215] ) (case_arm pat_list: [{(y)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_skip_host_errors) op: Equal rhs: {(1)} spids: [8112] ) ] spids: [8112] ) ] spids: [8108 8109 8116 16777215] ) (case_arm pat_list: [{(a)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_async_cubes) op: Equal rhs: {(1)} spids: [8123] ) ] spids: [8123] ) ] spids: [8119 8120 8127 16777215] ) (case_arm pat_list: [{(b)}] action: [(C {(p666_install)})] spids: [8130 8131 8137 16777215] ) (case_arm pat_list: [{(h)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_processed_hostname) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(p666_process_hostname)} {(DQ (${ VSub_Name OPTARG))} ) ] ) left_token: <Left_CommandSub '$('> spids: [8145 8153] ) } spids: [8144] ) ] spids: [8144] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_processed_hostname))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_hosts) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_append_str)} {(DQ (${ VSub_Name p666_hosts))} {(DQ (${ VSub_Name p666_processed_hostname))} ) ] ) left_token: <Left_CommandSub '$('> spids: [8179 8193] ) } spids: [8178] ) ] spids: [8178] ) ] spids: [16777215 8175] ) ] else_action: [ (C {(p666_printf_error)} { (DQ ('No known hosts match ') (${ VSub_Name OPTARG) (' from ') (${ VSub_Name p666_all_hosts) ) } ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [8196 8218] ) ] spids: [8140 8141 8221 16777215] ) (case_arm pat_list: [{(c)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cubes) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_append_str)} {(DQ (${ VSub_Name p666_cubes))} {(DQ (${ VSub_Name OPTARG))} ) ] ) left_token: <Left_CommandSub '$('> spids: [8229 8243] ) } spids: [8228] ) ] spids: [8228] ) ] spids: [8224 8225 8246 16777215] ) (case_arm pat_list: [{(i)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_include_cubes) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_append_str)} {(DQ (${ VSub_Name p666_include_cubes))} {(DQ (${ VSub_Name OPTARG))} ) ] ) left_token: <Left_CommandSub '$('> spids: [8254 8268] ) } spids: [8253] ) ] spids: [8253] ) ] spids: [8249 8250 8271 16777215] ) (case_arm pat_list: [{(e)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-r)} {(DQ (${ VSub_Name OPTARG))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(p666_printf_error)} { (DQ ('Could not find ') (${ VSub_Name OPTARG) (' ENVAR script.') ) } ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [16777215 8295] ) ] spids: [16777215 8314] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_append_str)} {(DQ (${ VSub_Name p666_envar_scripts))} {(DQ (${ VSub_Name OPTARG))} ) ] ) left_token: <Left_CommandSub '$('> spids: [8318 8332] ) } spids: [8317] ) ] spids: [8317] ) ] spids: [8274 8275 8335 16777215] ) (case_arm pat_list: [{(u)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_user) op: Equal rhs: {(DQ (${ VSub_Name OPTARG))} spids: [8342] ) ] spids: [8342] ) ] spids: [8338 8339 8350 16777215] ) (case_arm pat_list: [{(p)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts_password) op: Equal rhs: {(DQ (${ VSub_Name OPTARG))} spids: [8357] ) ] spids: [8357] ) ] spids: [8353 8354 8365 16777215] ) (case_arm pat_list: [{(w)}] action: [ (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts_password) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(cat)} {(${ VSub_Name OPTARG)}) ] ) left_token: <Left_CommandSub '$('> spids: [8374 8380] ) ) } spids: [8372] ) ] spids: [8372] ) (C {(cube_check_return)}) ] ) ] spids: [8368 8369 8388 16777215] ) (case_arm pat_list: [{(r)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_roles) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_append_str)} {(DQ (${ VSub_Name p666_roles))} {(DQ (${ VSub_Name OPTARG))} ) ] ) left_token: <Left_CommandSub '$('> spids: [8396 8410] ) } spids: [8395] ) ] spids: [8395] ) ] spids: [8391 8392 8413 16777215] ) (case_arm pat_list: [{(o)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_option_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name OPTARG))}) (C {(sed)} {(SQ <'s/=.*//'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [8425 8441] ) } spids: [8424] ) ] spids: [8424] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_option_value) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name OPTARG))}) (C {(sed)} { (DQ ('s/^') (${ VSub_Name p666_option_name) ('=//') ) } ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [8445 8465] ) } spids: [8444] ) ] spids: [8444] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_option_value) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(p666_process_hostname)} {(DQ (${ VSub_Name p666_option_value))} ) ] ) left_token: <Left_CommandSub '$('> spids: [8469 8477] ) } spids: [8468] ) ] spids: [8468] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_options) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_append_str)} {(DQ (${ VSub_Name p666_options))} { (DQ (${ VSub_Name p666_option_name) ('=') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (${ VSub_Name p666_option_value) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } {(DQ (${ VSub_Name POSIXCUBE_NEWLINE))} ) ] ) left_token: <Left_CommandSub '$('> spids: [8481 8507] ) } spids: [8480] ) ] spids: [8480] ) ] spids: [8416 8417 8510 16777215] ) (case_arm pat_list: [{(z)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Name p666_specfile))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_foundspec) op: Equal rhs: {(0)} spids: [8535] ) ] spids: [8535] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_foundspec_names) op: Equal rhs: {(DQ )} spids: [8541] ) ] spids: [8541] ) (While cond: [ (Sentence child: (C {(read)} {(p666_specfile_line)}) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_specfile_line_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} { (DQ (${ VSub_Name p666_specfile_line ) ) } ) (C {(sed)} {(SQ <'s/=.*//'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [8559 8575] ) } spids: [8558] ) ] spids: [8558] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_foundspec_names) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_append_str)} { (DQ (${ VSub_Name p666_foundspec_names ) ) } {(DQ (${ VSub_Name p666_specfile_line_name))} ) ] ) left_token: <Left_CommandSub '$('> spids: [8579 8593] ) } spids: [8578] ) ] spids: [8578] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (${ VSub_Name p666_specfile_line_name ) ) } {(Lit_Other '=')} {(DQ (${ VSub_Name OPTARG))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_foundspec) op: Equal rhs: {(1)} spids: [8620] ) ] spids: [8620] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: p666_specfile_line_value ) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} { (DQ (${ VSub_Name p666_specfile_line ) ) } ) (C {(sed)} { (DQ ('s/^') (${ VSub_Name p666_specfile_line_name ) ('=//') ) } ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [8625 8645] ) } spids: [8624] ) ] spids: [8624] ) (C {(p666_process_options)} { (${ VSub_Name p666_specfile_line_value ) } ) (ControlFlow token: <ControlFlow_Break break> ) ] spids: [16777215 8617] ) ] spids: [16777215 8658] ) ] spids: [8555 8661] ) redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(DQ (${ VSub_Name p666_specfile))} spids: [8663] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_foundspec)} {(-eq)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(p666_printf_error)} { (DQ ('Could not find ') (${ VSub_Name OPTARG) (' in ') (${ VSub_Name p666_specfile) (' file with specs ') (${ VSub_Name p666_foundspec_names) ) } ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [16777215 8689] ) ] spids: [16777215 8715] ) ] spids: [16777215 8532] ) ] else_action: [ (C {(p666_printf_error)} { (DQ ('Could not find ') (${ VSub_Name p666_specfile) (' file') ) } ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [8718 8737] ) ] spids: [8513 8514 8740 16777215] ) ] spids: [8030 8036 8743] ) ] spids: [8027 8746] ) ) ] spids: [7994] ) spids: [7990 7993] ) (C {(p666_process_options)} {(DQ (${ VSub_At '@'))}) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_envar_scripts_password))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(-r)} {(TildeSubPart prefix:'') (/.posixcube.pwd)} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts_password) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(cat)} {(TildeSubPart prefix:'') (/.posixcube.pwd)}) ] ) left_token: <Left_CommandSub '$('> spids: [8802 8807] ) ) } spids: [8800] ) ] spids: [8800] ) (C {(cube_check_return)}) ] ) ] spids: [16777215 8797] ) ] spids: [16777215 8815] ) (C {(shift)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{(${ VSub_Name OPTIND)}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [8821 8828] ) } ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other '=')} {(DQ (--))} {(Lit_Other ']')} ) (C {(shift)}) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_envar_scripts))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (SimpleCommand words: [{(ls)} {(-1)} {(${ VSub_Name p666_default_envars)}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [8885] ) ] ) (C {(paste)} {(-sd)} {(SQ <' '>)} {(-)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [8876 8899] ) ) } spids: [8874] ) ] spids: [8874] ) ] spids: [16777215 8871] ) ] spids: [16777215 8903] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_envar_scripts))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')}) (C {(p666_printf)} { (DQ ('Using ENVAR files: ') (${ VSub_Name p666_envar_scripts) (Lit_Other '\\') (n) ) } ) ] ) ] spids: [16777215 8926] ) ] spids: [16777215 8955] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_commands) op: Equal rhs: {(DQ (${ VSub_At '@'))} spids: [8960] ) ] spids: [8960] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_hosts))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_commands))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Case to_match: {(DQ (${ VSub_Number 1))} arms: [ (case_arm pat_list: [{(edit)} {(show)} {(source)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_envar_scripts))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (ForEach iter_name: p666_envar_script iter_words: [{(${ VSub_Name p666_envar_scripts)}] do_arg_iter: F body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts_enc) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} { (${ VSub_Name p666_envar_script ) } {(Lit_Other ':')} {(SQ <'.*enc$'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [9072 9084] ) } spids: [9071] ) ] spids: [9071] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (${ VSub_Name p666_envar_scripts_enc ) } {(-ne)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_command_exists)} {(gpg)} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: p666_envar_script_new ) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} { (DQ (${ VSub_Name p666_envar_script ) ) } ) (C {(sed)} { (SQ < 's/enc$/dec/g' > ) } ) ] negated: F ) ] ) left_token: <Left_CommandSub '$(' > spids: [9117 9133] ) } spids: [9116] ) ] spids: [9116] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (${ VSub_Name p666_envar_scripts_password ) ) } {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(p666_printf)} { (DQ ( 'Enter the password for ' ) (${ VSub_Name p666_envar_script) (':') (Lit_Other '\\') (n) ) } ) (AndOr ops: [Op_DPipe] children: [ (C {(gpg)} {(--output)} { (DQ (${ VSub_Name p666_envar_script_new ) ) } {(--yes)} {(--decrypt)} {(DQ (${ VSub_Name p666_envar_script))} ) (C { ( cube_check_return ) } ) ] ) ] spids: [16777215 9156] ) ] else_action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} { (${ VSub_Name p666_debug ) } {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('Decrypting ') (${ VSub_Name p666_envar_script ) (' ...') (Lit_Other '\\') (n) ) } ) ] ) (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: p666_gpg_output ) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C { ( echo ) } {(DQ (${ VSub_Name p666_envar_scripts_password))} ) (SimpleCommand words: [ { ( gpg ) } { ( --passphrase-fd ) } { ( 0 ) } { ( --batch ) } { ( --yes ) } { ( --output ) } { (DQ (${ VSub_Name p666_envar_script_new ) ) } { ( --decrypt ) } { (DQ (${ VSub_Name p666_envar_script ) ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 2 arg_word: { ( 1 ) } spids: [ 9266 ] ) ] ) ] negated: F ) ] ) left_token: < Left_CommandSub '$(' > spids: [ 9229 9268 ] ) ) } spids: [9227] ) ] spids: [9227] ) (C {(cube_check_return)} { (DQ (${ VSub_Name p666_gpg_output ) ) } ) ] ) ] spids: [9197 9282] ) (Case to_match: {(DQ (${ VSub_Number 1))} arms: [ (case_arm pat_list: [{(show)}] action: [ (C {(p666_printf)} { (DQ ('Contents of ') (${ VSub_Name p666_envar_script ) (':') (Lit_Other '\\') (n) ) } ) (C {(cat)} { (DQ (${ VSub_Name p666_envar_script_new ) ) } ) ] spids: [ 9298 9299 9324 16777215 ] ) (case_arm pat_list: [{(source)}] action: [ (C {(chmod)} {(u) (Lit_Other '+') (x) } {(DQ (${ VSub_Name p666_envar_script_new))} ) (C {(.)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C { ( cube_readlink ) } {(DQ (${ VSub_Name p666_envar_script_new))} ) ] ) left_token: < Left_CommandSub '$(' > spids: [9347 9355] ) ) } ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} { (${ VSub_Name p666_debug ) } {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('Sourced ') (${ VSub_Name p666_envar_script ) (...) (Lit_Other '\\') (n) ) } ) ] ) ] spids: [ 9327 9328 9386 16777215 ] ) (case_arm pat_list: [{(edit)}] action: [ (AndOr ops: [Op_DPipe] children: [ (C { (DQ (BracedVarSub token: < VSub_Name EDITOR > suffix_op: (StringUnary op_id: VTest_ColonHyphen arg_word: {(vi)} ) spids: [ 9394 9398 ] ) ) } {(DQ (${ VSub_Name p666_envar_script_new))} ) (C { ( cube_check_return ) } ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C { ( Lit_Other '[' ) } {(DQ (${ VSub_Name p666_envar_scripts_password))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';' > ) ] action: [ (C {(p666_printf)} { (DQ ( 'Enter the password to re-encrypt ' ) (${ VSub_Name p666_envar_script) (':') (Lit_Other '\\') (n) ) } ) (AndOr ops: [Op_DPipe] children: [ (C {(gpg)} {(--yes)} {(--s2k-mode)} {(3)} {(--s2k-count)} {(65536)} {(--force-mdc)} {(--cipher-algo)} {(AES256)} { ( --s2k-digest-algo ) } {(SHA512)} {(-o)} {(DQ (${ VSub_Name p666_envar_script))} {(--symmetric)} { (DQ (${ VSub_Name p666_envar_script_new ) ) } ) (C { ( cube_check_return ) } ) ] ) ] spids: [ 16777215 9432 ] ) ] else_action: [ (AndOr ops: [Op_DAmp] children: [ (C { (Lit_Other '[' ) } {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ( 'Re-encrypting ' ) (${ VSub_Name p666_envar_script) (' ...') (Lit_Other '\\') (n) ) } ) ] ) (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: p666_gpg_output ) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C { ( echo ) } {(DQ (${ VSub_Name p666_envar_scripts_password))} ) (SimpleCommand words: [ { ( gpg ) } { ( --batch ) } { ( --passphrase-fd ) } { ( 0 ) } { ( --yes ) } { ( --no-use-agent ) } { ( --s2k-mode ) } { ( 3 ) } { ( --s2k-count ) } { ( 65536 ) } { ( --force-mdc ) } { ( --cipher-algo ) } { ( AES256 ) } { ( --s2k-digest-algo ) } { ( SHA512 ) } { ( -o ) } { (DQ (${ VSub_Name p666_envar_script ) ) } { ( --symmetric ) } { (DQ (${ VSub_Name p666_envar_script_new ) ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 2 arg_word: { ( 1 ) } spids: [ 9582 ] ) ] ) ] negated: F ) ] ) left_token: < Left_CommandSub '$(' > spids: [ 9525 9584 ] ) ) } spids: [ 9523 ] ) ] spids: [9523] ) (C { ( cube_check_return ) } {(DQ (${ VSub_Name p666_gpg_output))} ) ] ) ] spids: [9491 9598] ) ] spids: [ 9389 9390 9601 16777215 ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(p666_show_usage)} { (DQ ( 'Not implemented' ) ) } ) ] spids: [ 9604 9605 9615 16777215 ] ) ] spids: [9287 9295 9618] ) (AndOr ops: [Op_DPipe] children: [ (C {(rm)} {(-f)} { (DQ (${ VSub_Name p666_envar_script_new ) ) } ) (C {(cube_check_return)}) ] ) ] spids: [16777215 9113] ) ] else_action: [ (C {(p666_show_usage)} { (DQ ( 'gpg program not found on the PATH' ) ) } ) ] spids: [9638 9648] ) ] spids: [16777215 9102] ) ] else_action: [ (Case to_match: {(DQ (${ VSub_Number 1))} arms: [ (case_arm pat_list: [{(show)}] action: [ (Pipeline children: [ (C {(cat)} { (DQ (${ VSub_Name p666_envar_script ) ) } ) (C {(grep)} {(-v)} { (DQ ('^#!/bin/sh') (Lit_Other '$') ) } ) ] negated: F ) ] spids: [9665 9666 9689 16777215] ) (case_arm pat_list: [{(source)}] action: [ (C {(.)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(cube_readlink)} { (DQ (${ VSub_Name p666_envar_script ) ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [9699 9707] ) ) } ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('Sourced ') (${ VSub_Name p666_envar_script ) (...) (Lit_Other '\\') (n) ) } ) ] ) ] spids: [9692 9693 9738 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(p666_show_usage)} {(DQ ('Not implemented'))} ) ] spids: [9741 9742 9752 16777215] ) ] spids: [9654 9662 9755] ) ] spids: [9651 9758] ) ] spids: [9068 9761] ) spids: [9062 9066] ) (Case to_match: {(DQ (${ VSub_Number 1))} arms: [ (case_arm pat_list: [{(source)}] action: [(C {(true)})] spids: [9777 9778 9784 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(0)} ) ] spids: [9787 9788 9796 16777215] ) ] spids: [9766 9774 9799] ) ] spids: [16777215 9054] ) ] else_action: [ (C {(p666_show_usage)} { (DQ ('Sub-COMMAND without -e ENVAR file and ') (${ VSub_Name p666_default_envars) (' not found.') ) } ) ] spids: [9802 9816] ) (Case to_match: {(DQ (${ VSub_Number 1))} arms: [ (case_arm pat_list: [{(source)}] action: [(C {(true)})] spids: [9830 9831 9837 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(0)} ) ] spids: [9840 9841 9849 16777215] ) ] spids: [9819 9827 9852] ) ] spids: [9027 9032 9855 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(p666_show_usage)} {(DQ ('Unknown sub-COMMAND ') (${ VSub_Number 1))} ) ] spids: [9858 9859 9872 16777215] ) ] spids: [9016 9024 9875] ) ] spids: [16777215 9013] ) ] else_action: [ (C {(p666_show_usage)} {(DQ ('No hosts specified with -h and no sub-COMMAND specified.'))} ) ] spids: [9878 9888] ) ] spids: [16777215 8987] ) ] spids: [16777215 9891] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name POSIXCUBE_SOURCED))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_commands))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_cubes))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [(C {(p666_show_usage)} {(DQ ('No COMMANDs or CUBEs specified.'))})] spids: [16777215 9952] ) ] spids: [16777215 9962] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')}) (C {(p666_show_version)}) ] ) (FuncDef name: p666_handle_remote_response body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_handle_remote_response_context) op: Equal rhs: {(DQ (${ VSub_Number 1))} spids: [9992] ) ] spids: [9992] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_handle_remote_response_context))} {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_handle_remote_response_context) op: Equal rhs: {(DQ ('Last command'))} spids: [10021] ) ] spids: [10021] ) ] spids: [16777215 10018] ) ] spids: [16777215 10027] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output_color) op: Equal rhs: {(${ VSub_Name POSIXCUBE_COLOR_GREEN)} spids: [10030] ) ] spids: [10030] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output) op: Equal rhs: {(DQ )} spids: [10036] ) ] spids: [10036] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_host_output_result)} {(-ne)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output_color) op: Equal rhs: {(${ VSub_Name POSIXCUBE_COLOR_RED)} spids: [10059] ) ] spids: [10059] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output) op: Equal rhs: { (DQ (${ VSub_Name p666_handle_remote_response_context) (' failed with return code ') (${ VSub_Name p666_host_output_result) ) } spids: [10065] ) ] spids: [10065] ) ] spids: [16777215 10056] ) ] else_action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output) op: Equal rhs: {(DQ ('Commands succeeded.'))} spids: [10094] ) ] spids: [10094] ) ] ) ] spids: [10077 10100] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_host_output))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('[') (${ VSub_Name p666_host_output_color) (${ VSub_Name p666_host) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] %s') (Lit_Other '\\') (n) ) } {(DQ (${ VSub_Name p666_host_output))} ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_host_output_result)} {(-ne)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(p666_exit)} {(${ VSub_Name p666_host_output_result)})] spids: [16777215 10161] ) ] spids: [16777215 10171] ) ] spids: [9989] ) spids: [9985 9988] ) (FuncDef name: p666_remote_ssh body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_remote_ssh_commands) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [10185] ) ] spids: [10185] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('[') (${ VSub_Name POSIXCUBE_COLOR_GREEN) (${ VSub_Name p666_host) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] Executing ssh ') (${ VSub_Name p666_user) ('@') (${ VSub_Name p666_host) (' ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name p666_remote_ssh_commands) (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (' ...') (Lit_Other '\\') (n) ) } ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_parallel)} {(-gt)} {(0)} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(${ VSub_Name p666_async)} {(-eq)} {(1)} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (SimpleCommand words: [ {(ssh)} {(-o)} {(Lit_VarLike 'ConnectTimeout=') (10)} {(${ VSub_Name p666_user) (Lit_Other '@') (${ VSub_Name p666_host) } {(${ VSub_Name p666_remote_ssh_commands)} ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [10291] ) ] ) terminator: <Op_Amp '&'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_wait_pids) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_append_str)} {(DQ (${ VSub_Name p666_wait_pids))} {(DQ ($ VSub_Bang '$!'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [10298 10310] ) } spids: [10297] ) ] spids: [10297] ) ] spids: [16777215 10269] ) ] else_action: [ (SimpleCommand words: [ {(ssh)} {(-o)} {(Lit_VarLike 'ConnectTimeout=') (10)} {(${ VSub_Name p666_user) (Lit_Other '@') (${ VSub_Name p666_host) } {(${ VSub_Name p666_remote_ssh_commands)} ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [10335] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [10339] ) ] spids: [10339] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('Finished executing on ') (${ VSub_Name p666_host) (Lit_Other '\\') (n) ) } ) ] ) (C {(p666_handle_remote_response)} {(DQ ('Remote commands through SSH'))} ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name p666_host_output_result)} ) ] spids: [10313 10387] ) ] spids: [10182] ) spids: [10178 10181] ) (FuncDef name: p666_remote_transfer body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_remote_transfer_source) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [10401] ) ] spids: [10401] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_remote_transfer_dest) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [10407] ) ] spids: [10407] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('[') (${ VSub_Name POSIXCUBE_COLOR_GREEN) (${ VSub_Name p666_host) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] Executing rsync ') (${ VSub_Name p666_remote_transfer_source) (' to ') (${ VSub_Name p666_user) ('@') (${ VSub_Name p666_host) (':') (${ VSub_Name p666_remote_transfer_dest) (' ...') (Lit_Other '\\') (n) ) } ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_parallel)} {(-gt)} {(0)} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(${ VSub_Name p666_async)} {(-eq)} {(1)} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('Rsyncing in background: ') (${ VSub_Name p666_remote_transfer_source) (' ') (${ VSub_Name p666_user) ('@') (${ VSub_Name p666_host) (':') (${ VSub_Name p666_remote_transfer_dest) (Lit_Other '\\') (n) ) } ) ] ) (Sentence child: (C {(rsync)} {(-rlpt)} {(${ VSub_Name p666_remote_transfer_source)} { (DQ (${ VSub_Name p666_user) ('@') (${ VSub_Name p666_host) (':') (${ VSub_Name p666_remote_transfer_dest) ) } ) terminator: <Op_Amp '&'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_wait_pids) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_append_str)} {(DQ (${ VSub_Name p666_wait_pids))} {(DQ ($ VSub_Bang '$!'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [10564 10576] ) } spids: [10563] ) ] spids: [10563] ) ] spids: [16777215 10497] ) ] else_action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('Rsyncing in foreground: ') (${ VSub_Name p666_remote_transfer_source) (' ') (${ VSub_Name p666_user) ('@') (${ VSub_Name p666_host) (':') (${ VSub_Name p666_remote_transfer_dest) (Lit_Other '\\') (n) ) } ) ] ) (C {(rsync)} {(-rlpt)} {(${ VSub_Name p666_remote_transfer_source)} { (DQ (${ VSub_Name p666_user) ('@') (${ VSub_Name p666_host) (':') (${ VSub_Name p666_remote_transfer_dest) ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [10643] ) ] spids: [10643] ) (C {(p666_handle_remote_response)} {(DQ (rsync))}) ] spids: [10579 10654] ) ] spids: [10398] ) spids: [10394 10397] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cubedir) op: Equal rhs: { (BracedVarSub token: <VSub_Name p666_cubedir> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /)}) spids: [10662 10666] ) } spids: [10661] ) ] spids: [10661] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_name) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(cube_current_script_name)})] ) left_token: <Left_CommandSub '$('> spids: [10673 10675] ) ) } spids: [10671] ) ] spids: [10671] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_path) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(cube_current_script_abs_path)})] ) left_token: <Left_CommandSub '$('> spids: [10681 10683] ) ) } spids: [10679] ) ] spids: [10679] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_remote_script) op: Equal rhs: {(DQ (${ VSub_Name p666_cubedir) (/) (${ VSub_Name p666_script_name))} spids: [10689] ) ] spids: [10689] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_contents) op: Equal rhs: { (DQ ('cube_initial_directory=') (EscapedLiteralPart token: <Lit_EscapedChar '\\$'> ) ('{PWD}') ) } spids: [10706] ) ] spids: [10706] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_envar_contents) op: Equal rhs: {(DQ )} spids: [10714] ) ] spids: [10714] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts_final) op: Equal rhs: {(DQ )} spids: [10721] ) ] spids: [10721] ) (ForEach iter_name: p666_envar_script iter_words: [{(${ VSub_Name p666_envar_scripts)}] do_arg_iter: F body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_script_remove) op: Equal rhs: {(0)} spids: [10743] ) ] spids: [10743] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_script_enc_matches) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(${ VSub_Name p666_envar_script)} {(Lit_Other ':')} {(SQ <'.*\\.enc$'>)} ) ] ) left_token: <Left_CommandSub '$('> spids: [10750 10762] ) } spids: [10749] ) ] spids: [10749] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_envar_script_enc_matches)} {(-ne)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(cube_command_exists)} {(gpg)}) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('Decrypting ') (${ VSub_Name p666_envar_script) ) } ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_script_new) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} { (DQ (${ VSub_Name p666_envar_script ) ) } ) (C {(sed)} {(SQ <'s/enc$/dec/g'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [10823 10839] ) } spids: [10822] ) ] spids: [10822] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (DQ (${ VSub_Name p666_envar_scripts_password ) ) } {(Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(p666_printf)} { (DQ ('Enter the password for ') (${ VSub_Name p666_envar_script) (':') (Lit_Other '\\') (n) ) } ) (AndOr ops: [Op_DPipe] children: [ (C {(gpg)} {(--output)} {(DQ (${ VSub_Name p666_envar_script_new))} {(--yes)} {(--decrypt)} {(DQ (${ VSub_Name p666_envar_script))} ) (C {(cube_check_return)}) ] ) ] spids: [16777215 10862] ) ] else_action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('Decrypting ') (${ VSub_Name p666_envar_script) (' ...') (Lit_Other '\\') (n) ) } ) ] ) (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_gpg_output) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} { (DQ (${ VSub_Name p666_envar_scripts_password ) ) } ) (SimpleCommand words: [ {(gpg)} {(--passphrase-fd)} {(0)} {(--batch)} {(--yes)} {(--output)} { (DQ (${ VSub_Name p666_envar_script_new ) ) } {(--decrypt)} { (DQ (${ VSub_Name p666_envar_script ) ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [10972] ) ] ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [10935 10974] ) ) } spids: [10933] ) ] spids: [10933] ) (C {(cube_check_return)} {(DQ (${ VSub_Name p666_gpg_output))} ) ] ) ] spids: [10903 10988] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_script) op: Equal rhs: {(DQ (${ VSub_Name p666_envar_script_new))} spids: [10993] ) ] spids: [10993] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_script_remove) op: Equal rhs: {(1)} spids: [11001] ) ] spids: [11001] ) ] spids: [16777215 10793] ) ] else_action: [ (C {(p666_printf_error)} {(DQ ('gpg program not found on the PATH'))} ) (C {(p666_exit)} {(1)}) ] spids: [11005 11020] ) ] spids: [16777215 10782] ) ] spids: [16777215 11023] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts_final) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(cube_append_str)} {(DQ (${ VSub_Name p666_envar_scripts_final))} {(DQ (${ VSub_Name p666_envar_script))} ) ] ) left_token: <Left_CommandSub '$('> spids: [11029 11043] ) } spids: [11028] ) ] spids: [11028] ) (C {(chmod)} {(u) (Lit_Other '+') (x)} {(DQ (${ VSub_Name p666_envar_script))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_contents) op: Equal rhs: { (DQ (${ VSub_Name p666_script_contents) ('\n') ('cd ') (${ VSub_Name p666_cubedir) ('/ || cube_check_return\n') ('. ') (${ VSub_Name p666_cubedir) (/) (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(${ VSub_Name p666_envar_script)}) ] ) left_token: <Left_CommandSub '$('> spids: [11079 11085] ) (' || cube_check_return') ) } spids: [11063] ) ] spids: [11063] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_envar_script_remove)} {(-eq)} {(1)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_contents) op: Equal rhs: { (DQ (${ VSub_Name p666_script_contents) ('\n') ('rm -f ') (${ VSub_Name p666_cubedir) (/) (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(${ VSub_Name p666_envar_script)} ) ] ) left_token: <Left_CommandSub '$('> spids: [11120 11126] ) (' || cube_check_return') ) } spids: [11109] ) ] spids: [11109] ) ] spids: [16777215 11106] ) ] spids: [16777215 11131] ) ] spids: [10738 11134] ) spids: [10732 10736] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts) op: Equal rhs: {(DQ (${ VSub_Name p666_envar_scripts_final))} spids: [11139] ) ] spids: [11139] ) (ForEach iter_name: p666_cube iter_words: [{(${ VSub_Name p666_cubes)}] do_arg_iter: F body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-d)} {(DQ (${ VSub_Name p666_cube))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(DQ (${ VSub_Name p666_cube))}) ] ) left_token: <Left_CommandSub '$('> spids: [11182 11190] ) } spids: [11181] ) ] spids: [11181] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} { (DQ (${ VSub_Name p666_cube) (/) (${ VSub_Name p666_cube_name) (.sh) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(chmod)} {(u) (Lit_Other '+') (x)} {(${ VSub_Name p666_cube) (/) (Lit_Other '*') (.sh)} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube) op: Equal rhs: { (BracedVarSub token: <VSub_Name p666_cube> suffix_op: (StringUnary op_id: VOp1_Percent arg_word: {(Lit_Slash /)} ) spids: [11231 11235] ) } spids: [11230] ) ] spids: [11230] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_contents) op: Equal rhs: { (DQ (${ VSub_Name p666_script_contents) ('\n') ('cd ') (${ VSub_Name p666_cubedir) (/) (${ VSub_Name p666_cube) ('/ || cube_check_return\n') ('cube_echo ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ('Started cube: ') (${ VSub_Name p666_cube_name) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('\n') ('POSIXCUBE_CUBE_NAME=') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name p666_cube_name) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' POSIXCUBE_CUBE_NAME_WITH_PREFIX=') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (' ') (${ VSub_Name p666_cube_name) (.sh) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' . ') (${ VSub_Name p666_cubedir) (/) (${ VSub_Name p666_cube) (/) (${ VSub_Name p666_cube_name) ('.sh || cube_check_return ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ('Last command in cube') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('\n') ('cube_echo ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ('Finished cube: ') (${ VSub_Name p666_cube_name) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('\n') ) } spids: [11238] ) ] spids: [11238] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} { (DQ (${ VSub_Name p666_cube) (/envars.sh)) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name: p666_script_envar_contents ) op: Equal rhs: { (DQ (${ VSub_Name p666_script_envar_contents ) ('\n') ('. ') (${ VSub_Name p666_cubedir) (/) (${ VSub_Name p666_cube) ( '/envars.sh || cube_check_return ' ) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('Failed loading cube envars') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ('\n') ) } spids: [11322] ) ] spids: [11322] ) ] spids: [16777215 11319] ) ] spids: [16777215 11344] ) ] spids: [16777215 11213] ) ] else_action: [ (C {(p666_printf_error)} { (DQ ('Could not find ') (${ VSub_Name p666_cube_name) ('.sh in cube ') (${ VSub_Name p666_cube) (' directory.') ) } ) (C {(p666_exit)} {(1)}) ] spids: [11347 11370] ) ] spids: [16777215 11178] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Name p666_cube))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(DQ (${ VSub_Name p666_cube))}) ] ) left_token: <Left_CommandSub '$('> spids: [11392 11400] ) } spids: [11391] ) ] spids: [11391] ) (C {(chmod)} {(u) (Lit_Other '+') (x)} {(DQ (${ VSub_Name p666_cube))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_contents) op: Equal rhs: { (DQ (${ VSub_Name p666_script_contents) ('\n') ('cd ') (${ VSub_Name p666_cubedir) ('/ || cube_check_return\n') ('cube_echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('Started cube: ') (${ VSub_Name p666_cube_name) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('\n') ('POSIXCUBE_CUBE_NAME=') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name p666_cube_name) (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (' POSIXCUBE_CUBE_NAME_WITH_PREFIX=') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' ') (${ VSub_Name p666_cube_name) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' . ') (${ VSub_Name p666_cubedir) (/) (${ VSub_Name p666_cube_name) (' || cube_check_return ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('Last command in cube') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ('\n') ('cube_echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('Finished cube: ') (${ VSub_Name p666_cube_name) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('\n') ) } spids: [11416] ) ] spids: [11416] ) ] spids: [11373 11388] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Name p666_cube) (.sh))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(DQ (${ VSub_Name p666_cube) (.sh))} ) ] ) left_token: <Left_CommandSub '$('> spids: [11492 11501] ) } spids: [11491] ) ] spids: [11491] ) (C {(chmod)} {(u) (Lit_Other '+') (x)} {(DQ (${ VSub_Name p666_cube) (.sh))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_contents) op: Equal rhs: { (DQ (${ VSub_Name p666_script_contents) ('\n') ('cd ') (${ VSub_Name p666_cubedir) ('/ || cube_check_return\n') ('cube_echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('Started cube: ') (${ VSub_Name p666_cube_name) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('\n') ('POSIXCUBE_CUBE_NAME=') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (${ VSub_Name p666_cube_name) (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (' POSIXCUBE_CUBE_NAME_WITH_PREFIX=') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' ') (${ VSub_Name p666_cube_name) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' . ') (${ VSub_Name p666_cubedir) (/) (${ VSub_Name p666_cube_name) (' || cube_check_return ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('Last command in cube') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ('\n') ('cube_echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('Finished cube: ') (${ VSub_Name p666_cube_name) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ('\n') ) } spids: [11518] ) ] spids: [11518] ) ] spids: [11472 11488] ) ] else_action: [ (C {(p666_printf_error)} { (DQ ('Cube ') (${ VSub_Name p666_cube) ( " could not be found as a directory or script, or you don't have read permissions." ) ) } ) (C {(p666_exit)} {(1)}) ] spids: [11574 11593] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_contents) op: Equal rhs: { (DQ (${ VSub_Name p666_script_contents) (${ VSub_Name POSIXCUBE_NEWLINE) ('cd ') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{cube_initial_directory}') ) } spids: [11596] ) ] spids: [11596] ) ] spids: [11160 11610] ) spids: [11154 11158] ) (ForEach iter_name: p666_cube iter_words: [{(${ VSub_Name p666_include_cubes)}] do_arg_iter: F body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-d)} {(DQ (${ VSub_Name p666_cube))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(DQ (${ VSub_Name p666_cube))}) ] ) left_token: <Left_CommandSub '$('> spids: [11648 11656] ) } spids: [11647] ) ] spids: [11647] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} { (DQ (${ VSub_Name p666_cube) (/) (${ VSub_Name p666_cube_name) (.sh) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(chmod)} {(u) (Lit_Other '+') (x)} {(${ VSub_Name p666_cube) (/) (Lit_Other '*') (.sh)} ) ] spids: [16777215 11679] ) ] spids: [16777215 11696] ) ] spids: [16777215 11644] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Name p666_cube))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(chmod)} {(u) (Lit_Other '+') (x)} {(DQ (${ VSub_Name p666_cube))} ) ] spids: [11699 11714] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Name p666_cube) (.sh))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(chmod)} {(u) (Lit_Other '+') (x)} {(DQ (${ VSub_Name p666_cube) (.sh))} ) ] spids: [11730 11746] ) ] else_action: [ (C {(p666_printf_error)} { (DQ ('Cube ') (${ VSub_Name p666_cube) ( " could not be found as a directory or script, or you don't have read permissions." ) ) } ) (C {(p666_exit)} {(1)}) ] spids: [11763 11782] ) ] spids: [11626 11785] ) spids: [11620 11624] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_commands))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_contents) op: Equal rhs: { (DQ (${ VSub_Name p666_script_contents) ('\n') (' ') (${ VSub_Name p666_commands) ) } spids: [11812] ) ] spids: [11812] ) ] spids: [16777215 11809] ) ] spids: [16777215 11825] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script) op: Equal rhs: {(DQ (./cube_exec.sh))} spids: [11830] ) ] spids: [11830] ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('#!/bin/sh\n') ('POSIXCUBE_APIS_ONLY=1\n') ('. ') (${ VSub_Name p666_remote_script) ('\n') ('if [ ') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('? -ne 0 ] ; then\n') (' echo ') (Right_DoubleQuote '"') ('Could not source ') (${ VSub_Name p666_remote_script) (' script') (Right_DoubleQuote '"') (' 1>&2\n') (' exit 1\n') ('fi\n') ('\n') ('POSIXCUBE_DEBUG=') (${ VSub_Name p666_debug) ('\n') ('cubevar_api_roles=') (Right_DoubleQuote '"') (${ VSub_Name p666_roles) (Right_DoubleQuote '"') ('\n') (${ VSub_Name p666_script_envar_contents) ('\n') (${ VSub_Name p666_options) ('\n') (${ VSub_Name p666_script_contents) ('\n') ('\n') ('if [ ') (Right_DoubleQuote '"') (EscapedLiteralPart token: <Lit_EscapedChar '\\$'> ) ('{cubevar_api_post_restart}') (Right_DoubleQuote '"') (' != ') (Right_DoubleQuote '"') (Right_DoubleQuote '"') (' ]; then\n') (' for p666_post in ') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{cubevar_api_post_restart}; do\n') (' cube_service restart ') (Right_DoubleQuote '"') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{p666_post}') (Right_DoubleQuote '"') ('\n') (' done\n') ('fi\n') ) } do_expansion: True here_end: HEREDOC was_filled: T spids: [11840] ) (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ (${ VSub_Name p666_script))} spids: [11843] ) ] ) (C {(chmod)} {(Lit_Other '+') (x)} {(DQ (${ VSub_Name p666_script))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_upload) op: Equal rhs: {(DQ (${ VSub_Name p666_script) (' '))} spids: [11935] ) ] spids: [11935] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_cubes))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (ForEach iter_name: p666_cube iter_words: [{(${ VSub_Name p666_cubes)}] do_arg_iter: F body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-d)} {(DQ (${ VSub_Name p666_cube))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(DQ (${ VSub_Name p666_cube))} ) ] ) left_token: <Left_CommandSub '$('> spids: [12000 12008] ) } spids: [11999] ) ] spids: [11999] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} { (DQ (${ VSub_Name p666_cube) (/) (${ VSub_Name p666_cube_name) (.sh) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube) op: Equal rhs: { (BracedVarSub token: <VSub_Name p666_cube> suffix_op: (StringUnary op_id: VOp1_Percent arg_word: {(Lit_Slash /)} ) spids: [12035 12039] ) } spids: [12034] ) ] spids: [12034] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_upload) op: Equal rhs: { (DQ (${ VSub_Name p666_upload) (' ') (${ VSub_Name p666_cube) ) } spids: [12042] ) ] spids: [12042] ) ] spids: [16777215 12031] ) ] spids: [16777215 12054] ) ] spids: [16777215 11996] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Name p666_cube))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(DQ (${ VSub_Name p666_cube))} ) ] ) left_token: <Left_CommandSub '$('> spids: [12076 12084] ) } spids: [12075] ) ] spids: [12075] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_upload) op: Equal rhs: { (DQ (${ VSub_Name p666_upload) (' ') (${ VSub_Name p666_cube) ) } spids: [12087] ) ] spids: [12087] ) ] spids: [12057 12072] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Name p666_cube) (.sh))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(DQ (${ VSub_Name p666_cube) (.sh))} ) ] ) left_token: <Left_CommandSub '$('> spids: [12119 12128] ) } spids: [12118] ) ] spids: [12118] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_upload) op: Equal rhs: { (DQ (${ VSub_Name p666_upload) (' ') (${ VSub_Name p666_cube) (.sh) ) } spids: [12131] ) ] spids: [12131] ) ] spids: [12099 12115] ) ] spids: [16777215 12144] ) ] spids: [11978 12147] ) spids: [11972 11976] ) ] spids: [16777215 11964] ) ] spids: [16777215 12150] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_include_cubes))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (ForEach iter_name: p666_cube iter_words: [{(${ VSub_Name p666_include_cubes)}] do_arg_iter: F body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-d)} {(DQ (${ VSub_Name p666_cube))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(DQ (${ VSub_Name p666_cube))} ) ] ) left_token: <Left_CommandSub '$('> spids: [12209 12217] ) } spids: [12208] ) ] spids: [12208] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} { (DQ (${ VSub_Name p666_cube) (/) (${ VSub_Name p666_cube_name) (.sh) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube) op: Equal rhs: { (BracedVarSub token: <VSub_Name p666_cube> suffix_op: (StringUnary op_id: VOp1_Percent arg_word: {(Lit_Slash /)} ) spids: [12244 12248] ) } spids: [12243] ) ] spids: [12243] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_upload) op: Equal rhs: { (DQ (${ VSub_Name p666_upload) (' ') (${ VSub_Name p666_cube) ) } spids: [12251] ) ] spids: [12251] ) ] spids: [16777215 12240] ) ] spids: [16777215 12263] ) ] spids: [16777215 12205] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Name p666_cube))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(DQ (${ VSub_Name p666_cube))} ) ] ) left_token: <Left_CommandSub '$('> spids: [12285 12293] ) } spids: [12284] ) ] spids: [12284] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_upload) op: Equal rhs: { (DQ (${ VSub_Name p666_upload) (' ') (${ VSub_Name p666_cube) ) } spids: [12296] ) ] spids: [12296] ) ] spids: [12266 12281] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(DQ (${ VSub_Name p666_cube) (.sh))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cube_name) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(DQ (${ VSub_Name p666_cube) (.sh))} ) ] ) left_token: <Left_CommandSub '$('> spids: [12328 12337] ) } spids: [12327] ) ] spids: [12327] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_upload) op: Equal rhs: { (DQ (${ VSub_Name p666_upload) (' ') (${ VSub_Name p666_cube) (.sh) ) } spids: [12340] ) ] spids: [12340] ) ] spids: [12308 12324] ) ] else_action: [ (C {(p666_printf_error)} {(DQ ('Could not find ') (${ VSub_Name p666_cube))} ) (C {(p666_exit)} {(1)}) ] spids: [12353 12371] ) ] spids: [12187 12374] ) spids: [12181 12185] ) ] spids: [16777215 12173] ) ] spids: [16777215 12377] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_quiet)} {(-eq)} {(0)} {(Lit_Other ']')}) (C {(p666_printf)} { (DQ ('Transferring files to hosts: ') (${ VSub_Name p666_hosts) (' ...') (Lit_Other '\\') (n) ) } ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_async) op: Equal rhs: {(1)} spids: [12410] ) ] spids: [12410] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_skip_init)} {(-eq)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_wait_pids) op: Equal rhs: {(DQ )} spids: [12434] ) ] spids: [12434] ) (ForEach iter_name: p666_host iter_words: [{(${ VSub_Name p666_hosts)}] do_arg_iter: F body: (DoGroup children: [ (C {(p666_remote_ssh)} { (DQ ('[ ! -d ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) (${ VSub_Name p666_cubedir) (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (' ] && mkdir -p ') (${ VSub_Name p666_cubedir) ('; RC=') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ( '?; command -v rsync >/dev/null 2>&1 || (command -v apt-get >/dev/null 2>&1 && apt-get -y install rsync); exit ' ) (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{RC};') ) } ) ] spids: [12450 12482] ) spids: [12444 12448] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_wait_pids))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('Waiting on initialization PIDs: ') (${ VSub_Name p666_wait_pids) (' ...') (Lit_Other '\\') (n) ) } ) ] ) (C {(wait)} {(${ VSub_Name p666_wait_pids)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [12541] ) ] spids: [12541] ) (C {(p666_handle_remote_response)} {(DQ ('Remote commands through SSH'))} ) ] spids: [16777215 12504] ) ] spids: [16777215 12552] ) ] spids: [16777215 12431] ) ] spids: [16777215 12555] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_wait_pids) op: Equal rhs: {(DQ )} spids: [12560] ) ] spids: [12560] ) (ForEach iter_name: p666_host iter_words: [{(${ VSub_Name p666_hosts)}] do_arg_iter: F body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_skip_init)} {(-eq)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(p666_remote_transfer)} { (DQ (${ VSub_Name p666_upload) (' ') (${ VSub_Name p666_script_path) (' ') (${ VSub_Name p666_envar_scripts) ) } {(DQ (${ VSub_Name p666_cubedir) (/))} ) ] spids: [16777215 12594] ) ] else_action: [ (C {(p666_remote_transfer)} { (DQ (${ VSub_Name p666_upload) (' ') (${ VSub_Name p666_envar_scripts) ) } {(DQ (${ VSub_Name p666_cubedir) (/))} ) ] spids: [12621 12644] ) ] spids: [12576 12647] ) spids: [12570 12574] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_wait_pids))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('Waiting on transfer PIDs: ') (${ VSub_Name p666_wait_pids) (' ...') (Lit_Other '\\') (n) ) } ) ] ) (C {(wait)} {(${ VSub_Name p666_wait_pids)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [12708] ) ] spids: [12708] ) (C {(p666_handle_remote_response)} {(DQ (rsync))}) ] spids: [16777215 12671] ) ] spids: [16777215 12719] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_wait_pids) op: Equal rhs: {(DQ )} spids: [12723] ) ] spids: [12723] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_async) op: Equal rhs: {(${ VSub_Name p666_async_cubes)} spids: [12728] ) ] spids: [12728] ) (ForEach iter_name: p666_host iter_words: [{(${ VSub_Name p666_hosts)}] do_arg_iter: F body: (DoGroup children: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_quiet)} {(-eq)} {(0)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('[') (${ VSub_Name POSIXCUBE_COLOR_GREEN) (${ VSub_Name p666_host) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] Executing on ') (${ VSub_Name p666_host) (' ...') (Lit_Other '\\') (n) ) } ) ] ) (C {(p666_remote_ssh)} { (DQ ('. ') (${ VSub_Name p666_cubedir) (/) (${ VSub_Name p666_script)) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_remote_ssh_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [12801] ) ] spids: [12801] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(${ VSub_Name p666_async)} {(-eq)} {(0)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_skip_host_errors)} {(-eq)} {(0)} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(${ VSub_Name p666_remote_ssh_result)} {(-ne)} {(0)} {(Lit_Other ']')} ) (C {(p666_exit)} {(${ VSub_Name p666_remote_ssh_result)}) ] ) ] spids: [16777215 12820] ) ] spids: [16777215 12858] ) ] spids: [12747 12861] ) spids: [12741 12745] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name p666_wait_pids))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(${ VSub_Name p666_debug)} {(-eq)} {(1)} {(Lit_Other ']')} ) (C {(p666_printf)} { (DQ ('Waiting on cube execution PIDs: ') (${ VSub_Name p666_wait_pids) (' ...') (Lit_Other '\\') (n) ) } ) ] ) (C {(wait)} {(${ VSub_Name p666_wait_pids)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [12921] ) ] spids: [12921] ) (C {(p666_handle_remote_response)} {(DQ ('Cube execution'))}) ] spids: [16777215 12884] ) ] spids: [16777215 12932] ) (C {(p666_exit)} {(0)}) ] spids: [16777215 9914] ) ] spids: [16777215 12941] ) ] spids: [16777215 6998] ) ] spids: [16777215 12943] ) ] )