(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: <Redir_DLess '<<'> fd: 16777215 here_begin: {(SQ <HEREDOC>)} here_end_span_id: 496 stdin_parts: [ ('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') ] ) ] ) (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 512] ) ] spids: [16777215 524] ) (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 546] ) ] spids: [16777215 554] ) ] spids: [101] ) spids: [97 100] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_VERSION) op:Equal rhs:{(0.1)} spids:[569])] spids: [569] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_DEBUG) op:Equal rhs:{(0)} spids:[572])] spids: [572] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_RESET) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[0m'))} spids: [575] ) ] spids: [575] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_RED) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[31m'))} spids: [581] ) ] spids: [581] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_GREEN) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[32m'))} spids: [587] ) ] spids: [587] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_YELLOW) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[33m'))} spids: [593] ) ] spids: [593] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_BLUE) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[34m'))} spids: [599] ) ] spids: [599] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_PURPLE) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[35m'))} spids: [605] ) ] spids: [605] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_CYAN) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[36m'))} spids: [611] ) ] spids: [611] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_COLOR_WHITE) op: Equal rhs: {(DQ (Lit_Other '\\') ('x1B[37m'))} spids: [617] ) ] spids: [617] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_NEWLINE) op: Equal rhs: {(DQ ('\n'))} spids: [624] ) ] spids: [624] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_CUBE_NAME) op:Equal rhs:{(DQ )} spids:[629])] spids: [629] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_CUBE_NAME_WITH_PREFIX) op: Equal rhs: {(DQ )} spids: [633] ) ] spids: [633] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_OS_UNKNOWN) op:Equal rhs:{(-1)} spids:[638])] spids: [638] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_OS_LINUX) op:Equal rhs:{(1)} spids:[641])] spids: [641] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_OS_MAC_OSX) op:Equal rhs:{(2)} spids:[644])] spids: [644] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_OS_WINDOWS) op:Equal rhs:{(3)} spids:[647])] spids: [647] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_OS_FLAVOR_UNKNOWN) op: Equal rhs: {(-1)} spids: [651] ) ] spids: [651] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_OS_FLAVOR_FEDORA) op: Equal rhs: {(1)} spids: [654] ) ] spids: [654] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_OS_FLAVOR_DEBIAN) op: Equal rhs: {(2)} spids: [657] ) ] spids: [657] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_OS_FLAVOR_UBUNTU) op: Equal rhs: {(3)} spids: [660] ) ] spids: [660] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:POSIXCUBE_SHELL_UNKNOWN) op: Equal rhs: {(-1)} spids: [664] ) ] spids: [664] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:POSIXCUBE_SHELL_BASH) op:Equal rhs:{(1)} spids:[667])] spids: [667] ) (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: [673 675] ) ) } spids: [671] ) ] spids: [671] ) (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: [735 737] ) ('] [') (${ VSub_Name POSIXCUBE_COLOR_GREEN) (${ VSub_Name POSIXCUBE_NODE_HOSTNAME) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') ) } ) ] spids: [16777215 728] ) ] else_action: [ (C {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [759 761] ) ('] [') (${ 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: [778 784] ) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') ) } ) ] spids: [752 792] ) (C {(echo)} {(DQ (${ VSub_At '@'))}) ] spids: [707] ) spids: [703 706] ) (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: [849] ) ] spids: [849] ) 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: [881 883] ) ('] [') (${ 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 874] ) ] else_action: [ (C {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [916 918] ) ('] [') (${ 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: [935 941] ) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') (${ VSub_Name cube_printf_str) (Lit_Other '\\') (n) ) } {(DQ (${ VSub_At '@'))} ) ] spids: [909 960] ) ] spids: [846] ) spids: [842 845] ) (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: [1021 1023] ) ('] [') (${ 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:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] spids: [16777215 1014] ) ] else_action: [ (SimpleCommand words: [ {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [1056 1058] ) ('] [') (${ 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: [1069 1075] ) (${ VSub_Name POSIXCUBE_COLOR_RESET) ('] ') (${ VSub_Name POSIXCUBE_COLOR_RED) (Error) (${ VSub_Name POSIXCUBE_COLOR_RESET) (': ') ) } ] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] spids: [1049 1094] ) (SimpleCommand words: [{(echo)} {(DQ (${ VSub_At '@'))}] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] spids: [993] ) spids: [989 992] ) (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: [1154] ) ] spids: [1154] ) 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: [1186 1188] ) ('] [') (${ 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:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] spids: [16777215 1179] ) ] else_action: [ (SimpleCommand words: [ {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [1232 1234] ) ('] [') (${ 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: [1245 1251] ) (${ 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:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] spids: [1225 1281] ) ] spids: [1151] ) spids: [1147 1150] ) (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: [1322] ) ] spids: [1322] ) (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 1349] ) ] spids: [16777215 1358] ) (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:[1374])] spids: [1374] ) (WhileUntil keyword: <KW_While 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: [1387 1391] ) } spids: [1386] ) ] spids: [1386] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_error_caller_result) op: Equal rhs: {(${ VSub_QMark '?')} spids: [1394] ) ] spids: [1394] ) (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: [1419 1435] ) } spids: [1418] ) ] spids: [1418] ) (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: [1439 1455] ) } spids: [1438] ) ] spids: [1438] ) (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: [1459 1483] ) } spids: [1458] ) ] spids: [1458] ) (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 1415] ) ] else_action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [1506 1512] ) (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: [1516 1523] ) } spids: [1515] ) ] spids: [1515] ) ] spids: [1383 1526] ) ) ] spids: [16777215 1371] ) ] spids: [16777215 1529] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-r)} {(/proc/) (${ VSub_Name cube_throw_pid) (/cmdline)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (WhileUntil keyword: <KW_While 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: [1565 1573] ) } spids: [1564] ) ] spids: [1564] ) (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: [1577 1595] ) } spids: [1576] ) ] spids: [1576] ) (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 1631] ) ] spids: [16777215 1640] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_throw_pid) op: Equal rhs: {(${ VSub_Name cube_throw_ppid)} spids: [1643] ) ] spids: [1643] ) ] spids: [1561 1649] ) ) ] spids: [16777215 1553] ) ] spids: [16777215 1652] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [1308] ) spids: [1304 1307] ) (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:[1703])] spids: [1703] ) (WhileUntil keyword: <KW_While 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: [1716 1720] ) } spids: [1715] ) ] spids: [1715] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_api_caller_result) op: Equal rhs: {(${ VSub_QMark '?')} spids: [1723] ) ] spids: [1723] ) (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: [1748 1764] ) } spids: [1747] ) ] spids: [1747] ) (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: [1768 1784] ) } spids: [1767] ) ] spids: [1767] ) (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: [1788 1812] ) } spids: [1787] ) ] spids: [1787] ) (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: [1816 1824] ) } spids: [1815] ) ] spids: [1815] ) (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 1869] ) ] spids: [16777215 1885] ) (C {(printf)} {(DQ ('%s'))} {(DQ (${ VSub_Name cube_api_caller_result_lineno))} ) (ControlFlow token: <ControlFlow_Break break> ) ] spids: [16777215 1847] ) ] spids: [16777215 1904] ) ] spids: [16777215 1744] ) ] else_action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [1907 1913] ) (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: [1917 1924] ) } spids: [1916] ) ] spids: [1916] ) ] spids: [1712 1927] ) ) ] spids: [16777215 1700] ) ] spids: [16777215 1930] ) ] spids: [1689] ) spids: [1685 1688] ) (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: [1957] ) ] spids: [1957] ) (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: [1981] ) ] spids: [1981] ) (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: [2008] ) ] spids: [2008] ) ] spids: [16777215 2005] ) ] spids: [16777215 2018] ) (C {(cube_throw)} { (DQ ('Previous command failed with code ') (${ VSub_Name cube_check_return_val) (${ VSub_Name cube_check_return_info) ) } ) ] spids: [16777215 1978] ) ] spids: [16777215 2034] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name cube_check_return_val)} ) ] spids: [1954] ) spids: [1950 1953] ) (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 2114] ) ] 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 2147] ) ] else_action: [ (C {(echo)} {(DQ (${ VSub_Number 1) (${ VSub_Number 3) (${ VSub_Number 2))}) ] spids: [2163 2181] ) ] spids: [2126 2184] ) ] spids: [2080] ) spids: [2076 2079] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)}) (Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) ] spids: [2214] ) spids: [2210 2213] ) (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: [2270] ) spids: [2266 2269] ) (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: [2324] ) spids: [2320 2323] ) (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: [2382 2386] ) ) } arms: [ (case_arm pat_list: [{(Linux)}] action: [(C {(echo)} {(${ VSub_Name POSIXCUBE_OS_LINUX)})] spids: [2392 2393 2403 16777215] ) (case_arm pat_list: [{(Darwin)}] action: [(C {(echo)} {(${ VSub_Name POSIXCUBE_OS_MAC_OSX)})] spids: [2406 2407 2417 16777215] ) (case_arm pat_list: [ {(CYGWIN) (Lit_Other '*')} {(MINGW32) (Lit_Other '*')} {(MSYS) (Lit_Other '*')} ] action: [(C {(echo)} {(${ VSub_Name POSIXCUBE_OS_WINDOWS)})] spids: [2420 2428 2438 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(echo)} {(${ VSub_Name POSIXCUBE_OS_UNKNOWN)})] spids: [2441 2442 2452 16777215] ) ] spids: [2379 2389 2455] ) ] spids: [2372] ) spids: [2368 2371] ) (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 2525] ) ] spids: [16777215 2533] ) ] spids: [2510 2513 2536 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 2554] ) ] spids: [16777215 2562] ) ] spids: [2539 2542 2565 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 2595] ) ] spids: [16777215 2603] ) ] spids: [2568 2571 2606 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(cube_throw)} {(DQ ('Unknown flavor ') (${ VSub_Number 1))})] spids: [2609 2610 2623 16777215] ) ] spids: [2499 2507 2626] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [2485] ) spids: [2481 2484] ) (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 2679] ) ] else_action: [(C {(echo)} {(${ VSub_Name POSIXCUBE_SHELL_UNKNOWN)})] spids: [2689 2699] ) ] spids: [2655] ) spids: [2651 2654] ) (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: [2735] ) ] spids: [2735] ) 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: [2732] ) spids: [2728 2731] ) (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 2852] ) ] else_action: [ (AndOr ops: [Op_DPipe] children: [ (C {(systemctl)} {($ VSub_Number '$1')} {($ VSub_Number '$2')}) (C {(cube_check_return)}) ] ) ] spids: [2864 2878] ) ] spids: [16777215 2830] ) (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 2912] ) ] spids: [16777215 2926] ) ] spids: [2881 2889] ) ] else_action: [(C {(cube_throw)} {(DQ ('Could not find service program'))})] spids: [2929 2939] ) (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: [2979] ) ] spids: [2979] ) ] spids: [2975 2976 2985 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: [2994] ) ] spids: [2994] ) ] spids: [2988 2991 3003 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: [3010] ) ] spids: [3010] ) ] spids: [3006 3007 3019 16777215] ) ] spids: [2964 2972 3022] ) (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: [3028 3052] ) (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(${ VSub_Name cube_service_verb)}) (C {(cut)} {(-c2-)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [3053 3065] ) (' ') ($ VSub_Number '$2') (' service') ) } ) ] spids: [16777215 2961] ) ] else_action: [(C {(cube_echo)} {(DQ ('Executed ') ($ VSub_Number '$1'))})] spids: [3072 3083] ) ] spids: [2808] ) spids: [2804 2807] ) (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: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [3140 3151] ) ) } spids: [3138] ) ] spids: [3138] ) (Pipeline children: [ (C {(echo)} {(DQ (${ VSub_Name cube_service_exists_output))}) (SimpleCommand words: [{(grep)} {(-l)} {(loaded)}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) ] negated: F ) (ControlFlow token: <ControlFlow_Return return> arg_word: {($ VSub_QMark '$?')} ) ] spids: [16777215 3135] ) ] else_action: [(C {(cube_throw)} {(DQ ('Not implemented'))})] spids: [3183 3193] ) ] spids: [3113] ) spids: [3109 3112] ) (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 3250] ) (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: [3278 3286] ) (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: [3339] ) ] ) (C {(cube_check_return)}) ] ) ] spids: [3314 3322] ) ] else_action: [ (C {(cube_throw)} {(DQ ('cube_package has not implemented your operating system yet'))}) ] spids: [3357 3367] ) ] spids: [3226] ) spids: [3222 3225] ) (FuncDef name: cube_current_script_name body: (BraceGroup children:[(C {(basename)} {(DQ ($ VSub_Number '$0'))})] spids:[3391]) spids: [3387 3390] ) (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: [3431 3437] ) ) } ) terminator: <Op_Semi ';'> ) (C {(pwd)} {(-P)}) ] ) left_token: <Left_CommandSub '$('> spids: [3426 3446] ) } spids: [3425] ) ] spids: [3425] ) (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: [3456 3458] ) ) } ) ] spids: [3422] ) spids: [3418 3421] ) (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: <Redir_Less '<'> fd: 16777215 arg_word: {(DQ (${ VSub_Number 1))} ) ] ) ] spids: [16777215 3515] ) ] else_action: [ (C {(cube_throw)} {(DQ ('Could not find or read file ') (${ VSub_Number 1))}) ] spids: [3531 3544] ) ] spids: [3489] ) spids: [3485 3488] ) (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: [3577] ) ] spids: [3577] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (CommandSubPart command_list: (CommandList children:[(C {(cube_shell)})]) left_token: <Left_CommandSub '$('> spids: [3585 3587] ) } {(-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: [3609] ) ] spids: [3609] ) ] spids: [16777215 3598] ) ] spids: [16777215 3617] ) (WhileUntil keyword: <KW_While 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:[3628])] ) (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: [3661 3684] ) } spids: [3660] ) ] spids: [3660] ) (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'>] spids: [3714 3716] ) ('{') } replace: {(EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{') } do_all: T do_prefix: F do_suffix: F ) spids: [3710 3721] ) } spids: [3709] ) ] spids: [3709] ) ] spids: [16777215 3706] ) ] 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: [3728 3755] ) } spids: [3727] ) ] spids: [3727] ) ] spids: [3724 3758] ) (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: [3764 3777] ) } spids: [3763] ) ] spids: [3763] ) (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: [3653 3813] ) ) ] spids: [3568] ) spids: [3564 3567] ) (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: [3846] ) ] spids: [3846] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_read_heredoc_result) op: Equal rhs: {(DQ )} spids: [3850] ) ] spids: [3850] ) (WhileUntil keyword: <KW_While while> cond: [ (Sentence child: (SimpleCommand words: [{(read)} {(-r)} {(cube_read_heredoc_line)}] more_env: [(env_pair name:IFS val:{(SQ <'\\n'>)} spids:[3857])] ) 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: [3890] ) ] spids: [3890] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_read_heredoc_first) op: Equal rhs: {(0)} spids: [3898] ) ] spids: [3898] ) ] spids: [16777215 3887] ) ] 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: [3905] ) ] spids: [3905] ) ] spids: [3902 3919] ) ] spids: [3869 3922] ) ) ] spids: [3843] ) spids: [3839 3842] ) (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: [3978] ) ] spids: [3978] ) 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: [3987] ) ] spids: [3987] ) 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: [3997] ) ] spids: [3997] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_needs_replace) op: Equal rhs: {(0)} spids: [4007] ) ] spids: [4007] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_input_file_needs_remove) op: Equal rhs: {(0)} spids: [4011] ) ] spids: [4011] ) (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 4031] ) ] spids: [16777215 4044] ) (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: [4052 4060] ) ) } ) (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: [4067 4081] ) } spids: [4066] ) ] spids: [4066] ) (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: [4104] ) ] spids: [4104] ) (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: [4112] ) ] spids: [4112] ) (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: <Redir_Less '<'> fd: 16777215 arg_word: {(DQ (${ VSub_Name cube_set_file_contents_input_file_original))} ) (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ (${ VSub_Name cube_set_file_contents_input_file))} ) ] ) (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: [4204] ) ] spids: [4204] ) ] spids: [16777215 4099] ) ] spids: [16777215 4208] ) (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: [4235 4243] ) } spids: [4234] ) ] spids: [4234] ) (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: [4247 4255] ) } spids: [4246] ) ] spids: [4246] ) (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 4275] ) ] spids: [16777215 4296] ) (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: [4327 4343] ) } spids: [4326] ) ] spids: [4326] ) (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: [4347 4363] ) } spids: [4346] ) ] spids: [4346] ) (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 4382] ) ] spids: [16777215 4399] ) (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: [4429] ) ] spids: [4429] ) ] spids: [16777215 4426] ) ] spids: [16777215 4433] ) ] spids: [16777215 4318] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_needs_replace) op: Equal rhs: {(1)} spids: [4439] ) ] spids: [4439] ) ] spids: [4436 4443] ) ] spids: [16777215 4225] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_set_file_contents_needs_replace) op: Equal rhs: {(1)} spids: [4449] ) ] spids: [4449] ) ] spids: [4446 4453] ) (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 4525] ) ] spids: [16777215 4543] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [16777215 4473] ) ] 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 4570] ) ] spids: [16777215 4588] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [4551 4596] ) ] spids: [3964] ) spids: [3960 3963] ) (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: [4626] ) spids: [4622 4625] ) (FuncDef name: cube_tmpdir body: (BraceGroup children:[(C {(echo)} {(DQ (/tmp/))})] spids:[4679]) spids: [4675 4678] ) (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: [4736] ) ] spids: [4736] ) 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: [4749 4751] ) (/tmpcontents_) (CommandSubPart command_list: (CommandList children:[(C {(cube_random_number)} {(10000)})]) left_token: <Left_CommandSub '$('> spids: [4753 4757] ) (.template) ) } spids: [4747] ) ] spids: [4747] ) (SimpleCommand words: [{(echo)} {(DQ (${ VSub_At '@'))}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ (${ VSub_Name cube_set_file_contents_tmp))} ) ] ) (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: [4798] ) ] spids: [4798] ) (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: [4722] ) spids: [4718 4721] ) (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: [4884] ) ] spids: [4884] ) (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: [4897 4907] ) ) } ) (C {(pwd)} {(-P)}) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [4889 4915] ) } spids: [4888] ) ] spids: [4888] ) (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: [4924 4934] ) } spids: [4919] ) ] spids: [4919] ) ] ) (WhileUntil keyword: <KW_While 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: [4958 4968] ) } spids: [4957] ) ] spids: [4957] ) (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: [4972 4980] ) } spids: [4971] ) ] spids: [4971] ) (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: [4998 5008] ) ) } ) (C {(pwd)}) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [4984 5014] ) (/) (CommandSubPart command_list: (CommandList children: [ (C {(basename)} {(--)} {(DQ (${ VSub_Name cube_readlink_sym))}) ] ) left_token: <Left_CommandSub '$('> spids: [5016 5026] ) } spids: [4983] ) ] spids: [4983] ) ] spids: [4954 5029] ) ) (C {(echo)} {(${ VSub_Name cube_readlink_path)}) ] spids: [4845] ) spids: [4841 4844] ) (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: [5092] ) ] spids: [5092] ) ] spids: [5086 5089 5096 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: [5105] ) ] spids: [5105] ) ] spids: [5099 5102 5109 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: [5118] ) ] spids: [5118] ) ] spids: [5112 5115 5122 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: [5129] ) ] spids: [5129] ) ] spids: [5125 5126 5133 16777215] ) ] spids: [5075 5083 5136] ) (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: [5143 5159] ) } ) right: (ArithWord w:{(Lit_Digits 1024)}) ) right: (ArithWord w:{(${ VSub_Name cube_total_memory_divisor)}) ) spids: [5141 5168] ) } ) ] spids: [5072] ) spids: [5068 5071] ) (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: [5224] ) ] spids: [5224] ) (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: [5261] ) ] spids: [5261] ) (C {(cube_echo)} {(DQ ('Created directory ') (${ VSub_Number 1))}) ] spids: [16777215 5243] ) ] spids: [16777215 5275] ) (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 5297] ) ] spids: [16777215 5317] ) (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 5339] ) ] spids: [16777215 5359] ) (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 5381] ) ] spids: [16777215 5401] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name cube_ensure_directory_result)} ) ] spids: [5210] ) spids: [5206 5209] ) (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: [5466] ) ] spids: [5466] ) (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: [5493 5501] ) ) } {($ 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: [5526] ) ] spids: [5526] ) (C {(cube_echo)} {(DQ ('Created file ') (${ VSub_Number 1))}) ] spids: [16777215 5485] ) ] spids: [16777215 5540] ) (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 5562] ) ] spids: [16777215 5582] ) (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 5604] ) ] spids: [16777215 5624] ) (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 5646] ) ] spids: [16777215 5666] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name cube_ensure_file_result)} ) ] spids: [5452] ) spids: [5448 5451] ) (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 5728] ) ] else_action: [(C {(cube_throw)} {(DQ ('TODO: Not implemented'))})] spids: [5744 5754] ) ] spids: [5704] ) spids: [5700 5703] ) (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 5789] ) ] else_action: [(C {(cube_throw)} {(DQ ('TODO: Not implemented'))})] spids: [5805 5815] ) ] spids: [5778] ) spids: [5774 5777] ) (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 5896] ) ] spids: [16777215 5904] ) ] spids: [5872 5907] ) spids: [5866 5870] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [5845] ) spids: [5841 5844] ) (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: [5967 5983] ) ) } spids: [5965] ) ] spids: [5965] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_file_contains_grep_results) op: Equal rhs: {($ VSub_QMark '$?')} spids: [5987] ) ] spids: [5987] ) (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 6008] ) ] else_action: [ (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name cube_file_contains_grep_results)} ) ] spids: [6020 6030] ) ] spids: [5945] ) spids: [5941 5944] ) (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: [6075 6087] ) } spids: [6074] ) ] spids: [6074] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cube_stdin_contains_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [6090] ) ] spids: [6090] ) (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 6109] ) ] else_action: [ (ControlFlow token: <ControlFlow_Return return> arg_word: {(${ VSub_Name cube_stdin_contains_result)} ) ] spids: [6121 6131] ) ] spids: [6060] ) spids: [6056 6059] ) (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: [6161] ) spids: [6157 6160] ) (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: [6245] ) spids: [6241 6244] ) (FuncDef name: cube_prompt body: (BraceGroup children: [ (C {(cube_check_numargs)} {(1)} {(DQ (${ VSub_At '@'))}) (WhileUntil keyword: <KW_While 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: [6384 6388 6396 16777215] ) (case_arm pat_list: [{(DQ )} {(Lit_Other '[') (Nn) (Lit_Other ']') (Lit_Other '*')}] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})] spids: [6399 6406 6414 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(echo)} {(DQ ('Please answer yes or no.'))})] spids: [6417 6418 6428 16777215] ) ] spids: [6373 6381 6431] ) ] spids: [6351 6434] ) ) ] spids: [6332] ) spids: [6328 6331] ) (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 6485] ) ] else_action: [ (AndOr ops: [Op_DPipe] children: [ (Pipeline children: [(C {(uname)} {(-n)}) (C {(sed)} {(SQ <'s/\\..*$//g'>)})] negated: F ) (C {(cube_check_return)}) ] ) ] spids: [6497 6517] ) ] spids: [6464] ) spids: [6460 6463] ) (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:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)}) (Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{($ VSub_QMark '$?')}) ] spids: [6547] ) spids: [6543 6546] ) (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 6666] ) ] spids: [16777215 6690] ) ] spids: [6616] ) spids: [6612 6615] ) (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: [6720] ) spids: [6716 6719] ) (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: [6774] ) spids: [6770 6773] ) (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: [6855 6875] ) } ] 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 6902] ) ] spids: [16777215 6910] ) ] spids: [6878 6913] ) spids: [6854 6876] ) (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [6833] ) spids: [6829 6832] ) (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 6991] ) ] else_action: [(C {(usermod)} {(-g)} {(DQ (${ VSub_Number 1))} {(DQ (${ VSub_Number 2))})] spids: [7013 7033] ) ] spids: [6957] ) spids: [6953 6956] ) (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: [7081 7085] ) ) } spids: [7079] ) ] spids: [7079] ) (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: [7109 7119] ) } spids: [7108] ) ] spids: [7108] ) (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 7143] ) ] else_action: [ (C {(cube_throw)} { (DQ ('Cannot read ') (${ VSub_Name cube_include_name) (/) (${ VSub_Name cube_include_name_base) (.sh) ) } ) ] spids: [7172 7190] ) ] spids: [16777215 7105] ) (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: [7193 7209] ) (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: [7233 7249] ) ] 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: [7274 7292] ) ] spids: [7063] ) spids: [7059 7062] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:cubevar_api_post_restart) op: Equal rhs: {(DQ )} spids: [7300] ) ] spids: [7300] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:cubevar_api_roles) op:Equal rhs:{(DQ )} spids:[7305])] spids: [7305] ) (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:[7354])] spids: [7354] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_quiet) op:Equal rhs:{(0)} spids:[7358])] spids: [7358] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_skip_init) op:Equal rhs:{(0)} spids:[7362])] spids: [7362] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_keep_exec) op:Equal rhs:{(0)} spids:[7366])] spids: [7366] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_skip_host_errors) op: Equal rhs: {(0)} spids: [7370] ) ] spids: [7370] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_hosts) op:Equal rhs:{(DQ )} spids:[7374])] spids: [7374] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_cubes) op:Equal rhs:{(DQ )} spids:[7379])] spids: [7379] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_include_cubes) op: Equal rhs: {(DQ )} spids: [7384] ) ] spids: [7384] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts) op: Equal rhs: {(DQ )} spids: [7389] ) ] spids: [7389] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts_password) op: Equal rhs: {(DQ )} spids: [7394] ) ] spids: [7394] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_user) op: Equal rhs: {(DQ (${ VSub_Name USER))} spids: [7399] ) ] spids: [7399] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_cubedir) op: Equal rhs: {(DQ ('~/posixcubes/'))} spids: [7407] ) ] spids: [7407] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_roles) op:Equal rhs:{(DQ )} spids:[7413])] spids: [7413] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_options) op:Equal rhs:{(DQ )} spids:[7418])] spids: [7418] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_specfile) op: Equal rhs: {(DQ (./cubespecs.ini))} spids: [7423] ) ] spids: [7423] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:p666_parallel) op:Equal rhs:{(0)} spids:[7429])] spids: [7429] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_async_cubes) op: Equal rhs: {(0)} spids: [7433] ) ] spids: [7433] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_default_envars) op: Equal rhs: {(DQ ('envars*sh envars*sh.enc'))} spids: [7437] ) ] spids: [7437] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} { (CommandSubPart command_list: (CommandList children:[(C {(cube_shell)})]) left_token: <Left_CommandSub '$('> spids: [7449 7451] ) } {(-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: [7465] ) ] spids: [7465] ) ] spids: [16777215 7462] ) ] spids: [16777215 7469] ) (FuncDef name: p666_show_version body: (BraceGroup children: [ (C {(p666_printf)} { (DQ ('posixcube.sh version ') (${ VSub_Name POSIXCUBE_VERSION) (Lit_Other '\\') (n) ) } ) ] spids: [7477] ) spids: [7473 7476] ) (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: [7503] ) ] spids: [7503] ) (C {(shift)}) (C {(printf)} { (DQ ('[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [7514 7516] ) ('] ') (${ VSub_Name p666_printf_str) ) } {(DQ (${ VSub_At '@'))} ) ] spids: [7500] ) spids: [7496 7499] ) (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: [7541] ) ] spids: [7541] ) (C {(shift)}) (SimpleCommand words: [ {(printf)} { (DQ (Lit_Other '\\') ('n[') (CommandSubPart command_list: (CommandList children:[(C {(date)})]) left_token: <Left_CommandSub '$('> spids: [7553 7555] ) ('] ') (${ 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:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] spids: [7538] ) spids: [7534 7537] ) (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: [7611 7623] ) } spids: [7610] ) ] spids: [7610] ) (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: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) ] spids: [16777215 7641] ) ] spids: [16777215 7664] ) ] spids: [7607 7667] ) spids: [7601 7605] ) (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:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) ] ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(${ VSub_Number 1)} ) ] spids: [7593] ) spids: [7589 7592] ) (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: [7719] ) ] spids: [7719] ) (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: [7739] ) ] spids: [7739] ) (Pipeline children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(SQ <HEREDOC>)} here_end_span_id: 7800 stdin_parts: [ ('_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' ) ] ) ] ) (SimpleCommand words: [{(tee)} {(${ VSub_Name p666_autocomplete_file)}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) ] ) ] negated: F ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_func_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [7803] ) ] spids: [7803] ) (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: [7835] ) ] spids: [7835] ) (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: [7864] ) ] spids: [7864] ) (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 7883] ) ] else_action: [ (C {(p666_printf)} { (DQ ('Could not execute ') (${ VSub_Name p666_autocomplete_file) (Lit_Other '\\') (n) ) } ) ] spids: [7898 7913] ) ] spids: [16777215 7854] ) ] else_action: [ (C {(p666_printf)} { (DQ ('Could not chmod +x ') (${ VSub_Name p666_autocomplete_file) (Lit_Other '\\') (n) ) } ) ] spids: [7916 7931] ) ] spids: [16777215 7822] ) ] 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: [7962 7964] ) (' -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: [7934 7983] ) ] spids: [16777215 7736] ) ] else_action: [ (C {(p666_printf)} { (DQ ( 'No directory /etc/bash_completion.d/ found, skipping Bash programmable completion installation.' ) (Lit_Other '\\') (n) ) } ) ] spids: [7986 7998] ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(${ VSub_Name p666_func_result)} ) ] spids: [7716] ) spids: [7712 7715] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_all_hosts) op: Equal rhs: {(DQ )} spids: [8012] ) ] spids: [8012] ) (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: [8026 8040] ) } spids: [8025] ) ] spids: [8025] ) (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 token: <Lit_TildeLike '~'> ) (/.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: [8108 8139] ) spids: [8099 16777215] ) (ForEach iter_name: k iter_words: [ {(/etc/ssh_known_hosts)} {(/etc/ssh/ssh_known_hosts)} { (TildeSubPart token: <Lit_TildeLike '~'> ) (/.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: [8156 8199] ) spids: [8147 16777215] ) (Sentence child: (C {(sed)} {(-n)} {(-e)} {(SQ <'s/^[0-9][0-9\\.]*//p'>)} {(/etc/hosts)} ) terminator: <Op_Semi ';'> ) ] spids: [8090] ) (C {(tr)} {(SQ <'\\n'>)} {(SQ <' '>)}) (C {(grep)} {(-v)} {(SQ <'*'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [8089 8234] ) } spids: [8088] ) ] spids: [8088] ) ] spids: [16777215 8085] ) ] spids: [16777215 8237] ) (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: [8243 8259] ) } spids: [8242] ) ] spids: [8242] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_process_hostname_list) op: Equal rhs: {(DQ )} spids: [8264] ) ] spids: [8264] ) (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: [8284 8296] ) } spids: [8283] ) ] spids: [8283] ) (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: [8318 8332] ) } spids: [8317] ) ] spids: [8317] ) ] spids: [16777215 8314] ) ] spids: [16777215 8335] ) ] spids: [8280 8338] ) spids: [8274 8278] ) (C {(echo)} {(DQ (${ VSub_Name p666_process_hostname_list))}) ] spids: [16777215 8058] ) ] else_action: [(C {(echo)} {(DQ (${ VSub_Number 1))})] spids: [8350 8362] ) ] spids: [8022] ) spids: [8018 8021] ) (FuncDef name: p666_process_options body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:OPTIND) op:Equal rhs:{(1)} spids:[8381])] spids: [8381] ) (WhileUntil keyword: <KW_While 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: [8419 8420 8426 16777215] ) (case_arm pat_list: [{(v)}] action: [ (C {(p666_show_version)}) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [8429 8430 8441 16777215] ) (case_arm pat_list: [{(d)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_debug) op: Equal rhs: {(1)} spids: [8448] ) ] spids: [8448] ) ] spids: [8444 8445 8452 16777215] ) (case_arm pat_list: [{(q)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_quiet) op: Equal rhs: {(1)} spids: [8459] ) ] spids: [8459] ) ] spids: [8455 8456 8463 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: [8470] ) ] spids: [8470] ) ] spids: [8466 8467 8474 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: [8481] ) ] spids: [8481] ) ] spids: [8477 8478 8485 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: [8492] ) ] spids: [8492] ) ] spids: [8488 8489 8496 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: [8503] ) ] spids: [8503] ) ] spids: [8499 8500 8507 16777215] ) (case_arm pat_list: [{(b)}] action: [(C {(p666_install)})] spids: [8510 8511 8517 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: [8525 8533] ) } spids: [8524] ) ] spids: [8524] ) (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: [8559 8573] ) } spids: [8558] ) ] spids: [8558] ) ] spids: [16777215 8555] ) ] 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: [8576 8598] ) ] spids: [8520 8521 8601 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: [8609 8623] ) } spids: [8608] ) ] spids: [8608] ) ] spids: [8604 8605 8626 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: [8634 8648] ) } spids: [8633] ) ] spids: [8633] ) ] spids: [8629 8630 8651 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 8675] ) ] spids: [16777215 8694] ) (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: [8698 8712] ) } spids: [8697] ) ] spids: [8697] ) ] spids: [8654 8655 8715 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: [8722] ) ] spids: [8722] ) ] spids: [8718 8719 8730 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: [8737] ) ] spids: [8737] ) ] spids: [8733 8734 8745 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: [8754 8760] ) ) } spids: [8752] ) ] spids: [8752] ) (C {(cube_check_return)}) ] ) ] spids: [8748 8749 8768 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: [8776 8790] ) } spids: [8775] ) ] spids: [8775] ) ] spids: [8771 8772 8793 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: [8805 8821] ) } spids: [8804] ) ] spids: [8804] ) (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: [8825 8845] ) } spids: [8824] ) ] spids: [8824] ) (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: [8849 8857] ) } spids: [8848] ) ] spids: [8848] ) (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: [8861 8887] ) } spids: [8860] ) ] spids: [8860] ) ] spids: [8796 8797 8890 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: [8915] ) ] spids: [8915] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_foundspec_names) op: Equal rhs: {(DQ )} spids: [8921] ) ] spids: [8921] ) (WhileUntil keyword: <KW_While 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: [8939 8955] ) } spids: [8938] ) ] spids: [8938] ) (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: [8959 8973] ) } spids: [8958] ) ] spids: [8958] ) (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: [9000] ) ] spids: [9000] ) (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: [9005 9025] ) } spids: [9004] ) ] spids: [9004] ) (C {(p666_process_options)} { (${ VSub_Name p666_specfile_line_value ) } ) (ControlFlow token: <ControlFlow_Break break> ) ] spids: [16777215 8997] ) ] spids: [16777215 9038] ) ] spids: [8935 9041] ) redirects: [ (Redir op: <Redir_Less '<'> fd: 16777215 arg_word: {(DQ (${ VSub_Name p666_specfile))} ) ] ) (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 9069] ) ] spids: [16777215 9095] ) ] spids: [16777215 8912] ) ] else_action: [ (C {(p666_printf_error)} { (DQ ('Could not find ') (${ VSub_Name p666_specfile) (' file') ) } ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [9098 9117] ) ] spids: [8893 8894 9120 16777215] ) ] spids: [8410 8416 9123] ) ] spids: [8407 9126] ) ) ] spids: [8374] ) spids: [8370 8373] ) (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 token:<Lit_TildeLike '~'>) (/.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 token:<Lit_TildeLike '~'>) (/.posixcube.pwd) } ) ] ) left_token: <Left_CommandSub '$('> spids: [9182 9187] ) ) } spids: [9180] ) ] spids: [9180] ) (C {(cube_check_return)}) ] ) ] spids: [16777215 9177] ) ] spids: [16777215 9195] ) (C {(shift)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{(${ VSub_Name OPTIND)}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [9201 9208] ) } ) (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: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(paste)} {(-sd)} {(SQ <' '>)} {(-)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [9256 9279] ) ) } spids: [9254] ) ] spids: [9254] ) ] spids: [16777215 9251] ) ] spids: [16777215 9283] ) (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 9306] ) ] spids: [16777215 9335] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_commands) op: Equal rhs: {(DQ (${ VSub_At '@'))} spids: [9340] ) ] spids: [9340] ) (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: [9452 9464] ) } spids: [9451] ) ] spids: [9451] ) (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: [9497 9513] ) } spids: [9496] ) ] spids: [9496] ) (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 9536] ) ] 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: < Redir_GreatAnd '2>&' > fd: 2 arg_word: { ( 1 ) } ) ] ) ] negated: F ) ] ) left_token: < Left_CommandSub '$(' > spids: [ 9609 9648 ] ) ) } spids: [9607] ) ] spids: [9607] ) (C {(cube_check_return)} { (DQ (${ VSub_Name p666_gpg_output ) ) } ) ] ) ] spids: [9577 9662] ) (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: [ 9678 9679 9704 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: [9727 9735] ) ) } ) (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: [ 9707 9708 9766 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: [ 9774 9778 ] ) ) } {(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 9812 ] ) ] 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: < Redir_GreatAnd '2>&' > fd: 2 arg_word: { ( 1 ) } ) ] ) ] negated: F ) ] ) left_token: < Left_CommandSub '$(' > spids: [ 9905 9964 ] ) ) } spids: [ 9903 ] ) ] spids: [9903] ) (C { ( cube_check_return ) } {(DQ (${ VSub_Name p666_gpg_output))} ) ] ) ] spids: [9871 9978] ) ] spids: [ 9769 9770 9981 16777215 ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(p666_show_usage)} { (DQ ( 'Not implemented' ) ) } ) ] spids: [ 9984 9985 9995 16777215 ] ) ] spids: [9667 9675 9998] ) (AndOr ops: [Op_DPipe] children: [ (C {(rm)} {(-f)} { (DQ (${ VSub_Name p666_envar_script_new ) ) } ) (C {(cube_check_return)}) ] ) ] spids: [16777215 9493] ) ] else_action: [ (C {(p666_show_usage)} { (DQ ( 'gpg program not found on the PATH' ) ) } ) ] spids: [10018 10028] ) ] spids: [16777215 9482] ) ] 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: [10045 10046 10069 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: [10079 10087] ) ) } ) (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: [10072 10073 10118 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(p666_show_usage)} {(DQ ('Not implemented'))} ) ] spids: [10121 10122 10132 16777215] ) ] spids: [10034 10042 10135] ) ] spids: [10031 10138] ) ] spids: [9448 10141] ) spids: [9442 9446] ) (Case to_match: {(DQ (${ VSub_Number 1))} arms: [ (case_arm pat_list: [{(source)}] action: [(C {(true)})] spids: [10157 10158 10164 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(0)} ) ] spids: [10167 10168 10176 16777215] ) ] spids: [10146 10154 10179] ) ] spids: [16777215 9434] ) ] else_action: [ (C {(p666_show_usage)} { (DQ ('Sub-COMMAND without -e ENVAR file and ') (${ VSub_Name p666_default_envars) (' not found.') ) } ) ] spids: [10182 10196] ) (Case to_match: {(DQ (${ VSub_Number 1))} arms: [ (case_arm pat_list: [{(source)}] action: [(C {(true)})] spids: [10210 10211 10217 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(0)} ) ] spids: [10220 10221 10229 16777215] ) ] spids: [10199 10207 10232] ) ] spids: [9407 9412 10235 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(p666_show_usage)} {(DQ ('Unknown sub-COMMAND ') (${ VSub_Number 1))} ) ] spids: [10238 10239 10252 16777215] ) ] spids: [9396 9404 10255] ) ] spids: [16777215 9393] ) ] else_action: [ (C {(p666_show_usage)} {(DQ ('No hosts specified with -h and no sub-COMMAND specified.'))} ) ] spids: [10258 10268] ) ] spids: [16777215 9367] ) ] spids: [16777215 10271] ) (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 10332] ) ] spids: [16777215 10342] ) (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: [10372] ) ] spids: [10372] ) (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: [10401] ) ] spids: [10401] ) ] spids: [16777215 10398] ) ] spids: [16777215 10407] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output_color) op: Equal rhs: {(${ VSub_Name POSIXCUBE_COLOR_GREEN)} spids: [10410] ) ] spids: [10410] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output) op: Equal rhs: {(DQ )} spids: [10416] ) ] spids: [10416] ) (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: [10439] ) ] spids: [10439] ) (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: [10445] ) ] spids: [10445] ) ] spids: [16777215 10436] ) ] 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: [10474] ) ] spids: [10474] ) ] ) ] spids: [10457 10480] ) (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 10541] ) ] spids: [16777215 10551] ) ] spids: [10369] ) spids: [10365 10368] ) (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: [10565] ) ] spids: [10565] ) (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: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) 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: [10678 10690] ) } spids: [10677] ) ] spids: [10677] ) ] spids: [16777215 10649] ) ] 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:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_host_output_result) op: Equal rhs: {($ VSub_QMark '$?')} spids: [10719] ) ] spids: [10719] ) (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: [10693 10767] ) ] spids: [10562] ) spids: [10558 10561] ) (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: [10781] ) ] spids: [10781] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_remote_transfer_dest) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [10787] ) ] spids: [10787] ) (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: [10944 10956] ) } spids: [10943] ) ] spids: [10943] ) ] spids: [16777215 10877] ) ] 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: [11023] ) ] spids: [11023] ) (C {(p666_handle_remote_response)} {(DQ (rsync))}) ] spids: [10959 11034] ) ] spids: [10778] ) spids: [10774 10777] ) (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: [11042 11046] ) } spids: [11041] ) ] spids: [11041] ) (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: [11053 11055] ) ) } spids: [11051] ) ] spids: [11051] ) (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: [11061 11063] ) ) } spids: [11059] ) ] spids: [11059] ) (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: [11069] ) ] spids: [11069] ) (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: [11086] ) ] spids: [11086] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script_envar_contents) op: Equal rhs: {(DQ )} spids: [11094] ) ] spids: [11094] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts_final) op: Equal rhs: {(DQ )} spids: [11101] ) ] spids: [11101] ) (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: [11123] ) ] spids: [11123] ) (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: [11130 11142] ) } spids: [11129] ) ] spids: [11129] ) (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: [11203 11219] ) } spids: [11202] ) ] spids: [11202] ) (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 11242] ) ] 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: < Redir_GreatAnd '2>&' > fd: 2 arg_word: {(1)} ) ] ) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [11315 11354] ) ) } spids: [11313] ) ] spids: [11313] ) (C {(cube_check_return)} {(DQ (${ VSub_Name p666_gpg_output))} ) ] ) ] spids: [11283 11368] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_script) op: Equal rhs: {(DQ (${ VSub_Name p666_envar_script_new))} spids: [11373] ) ] spids: [11373] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_script_remove) op: Equal rhs: {(1)} spids: [11381] ) ] spids: [11381] ) ] spids: [16777215 11173] ) ] else_action: [ (C {(p666_printf_error)} {(DQ ('gpg program not found on the PATH'))} ) (C {(p666_exit)} {(1)}) ] spids: [11385 11400] ) ] spids: [16777215 11162] ) ] spids: [16777215 11403] ) (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: [11409 11423] ) } spids: [11408] ) ] spids: [11408] ) (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: [11459 11465] ) (' || cube_check_return') ) } spids: [11443] ) ] spids: [11443] ) (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: [11500 11506] ) (' || cube_check_return') ) } spids: [11489] ) ] spids: [11489] ) ] spids: [16777215 11486] ) ] spids: [16777215 11511] ) ] spids: [11118 11514] ) spids: [11112 11116] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_envar_scripts) op: Equal rhs: {(DQ (${ VSub_Name p666_envar_scripts_final))} spids: [11519] ) ] spids: [11519] ) (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: [11562 11570] ) } spids: [11561] ) ] spids: [11561] ) (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: [11611 11615] ) } spids: [11610] ) ] spids: [11610] ) (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: [11618] ) ] spids: [11618] ) (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: [11702] ) ] spids: [11702] ) ] spids: [16777215 11699] ) ] spids: [16777215 11724] ) ] spids: [16777215 11593] ) ] 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: [11727 11750] ) ] spids: [16777215 11558] ) (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: [11772 11780] ) } spids: [11771] ) ] spids: [11771] ) (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: [11796] ) ] spids: [11796] ) ] spids: [11753 11768] ) (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: [11872 11881] ) } spids: [11871] ) ] spids: [11871] ) (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: [11898] ) ] spids: [11898] ) ] spids: [11852 11868] ) ] 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: [11954 11973] ) (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: [11976] ) ] spids: [11976] ) ] spids: [11540 11990] ) spids: [11534 11538] ) (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: [12028 12036] ) } spids: [12027] ) ] spids: [12027] ) (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 12059] ) ] spids: [16777215 12076] ) ] spids: [16777215 12024] ) (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: [12079 12094] ) (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: [12110 12126] ) ] 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: [12143 12162] ) ] spids: [12006 12165] ) spids: [12000 12004] ) (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: [12192] ) ] spids: [12192] ) ] spids: [16777215 12189] ) ] spids: [16777215 12205] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_script) op: Equal rhs: {(DQ (./cube_exec.sh))} spids: [12210] ) ] spids: [12210] ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(HEREDOC)} here_end_span_id: 12299 stdin_parts: [ ('#!/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') ] ) (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ (${ VSub_Name p666_script))} ) ] ) (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: [12316] ) ] spids: [12316] ) (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: [12381 12389] ) } spids: [12380] ) ] spids: [12380] ) (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: [12416 12420] ) } spids: [12415] ) ] spids: [12415] ) (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: [12423] ) ] spids: [12423] ) ] spids: [16777215 12412] ) ] spids: [16777215 12435] ) ] spids: [16777215 12377] ) (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: [12457 12465] ) } spids: [12456] ) ] spids: [12456] ) (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: [12468] ) ] spids: [12468] ) ] spids: [12438 12453] ) (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: [12500 12509] ) } spids: [12499] ) ] spids: [12499] ) (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: [12512] ) ] spids: [12512] ) ] spids: [12480 12496] ) ] spids: [16777215 12525] ) ] spids: [12359 12528] ) spids: [12353 12357] ) ] spids: [16777215 12345] ) ] spids: [16777215 12531] ) (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: [12590 12598] ) } spids: [12589] ) ] spids: [12589] ) (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: [12625 12629] ) } spids: [12624] ) ] spids: [12624] ) (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: [12632] ) ] spids: [12632] ) ] spids: [16777215 12621] ) ] spids: [16777215 12644] ) ] spids: [16777215 12586] ) (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: [12666 12674] ) } spids: [12665] ) ] spids: [12665] ) (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: [12677] ) ] spids: [12677] ) ] spids: [12647 12662] ) (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: [12709 12718] ) } spids: [12708] ) ] spids: [12708] ) (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: [12721] ) ] spids: [12721] ) ] spids: [12689 12705] ) ] else_action: [ (C {(p666_printf_error)} {(DQ ('Could not find ') (${ VSub_Name p666_cube))} ) (C {(p666_exit)} {(1)}) ] spids: [12734 12752] ) ] spids: [12568 12755] ) spids: [12562 12566] ) ] spids: [16777215 12554] ) ] spids: [16777215 12758] ) (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: [12791] ) ] spids: [12791] ) (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: [12815] ) ] spids: [12815] ) (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: [12831 12863] ) spids: [12825 12829] ) (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: [12922] ) ] spids: [12922] ) (C {(p666_handle_remote_response)} {(DQ ('Remote commands through SSH'))} ) ] spids: [16777215 12885] ) ] spids: [16777215 12933] ) ] spids: [16777215 12812] ) ] spids: [16777215 12936] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_wait_pids) op: Equal rhs: {(DQ )} spids: [12941] ) ] spids: [12941] ) (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 12975] ) ] else_action: [ (C {(p666_remote_transfer)} { (DQ (${ VSub_Name p666_upload) (' ') (${ VSub_Name p666_envar_scripts) ) } {(DQ (${ VSub_Name p666_cubedir) (/))} ) ] spids: [13002 13025] ) ] spids: [12957 13028] ) spids: [12951 12955] ) (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: [13089] ) ] spids: [13089] ) (C {(p666_handle_remote_response)} {(DQ (rsync))}) ] spids: [16777215 13052] ) ] spids: [16777215 13100] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_wait_pids) op: Equal rhs: {(DQ )} spids: [13104] ) ] spids: [13104] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:p666_async) op: Equal rhs: {(${ VSub_Name p666_async_cubes)} spids: [13109] ) ] spids: [13109] ) (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: [13182] ) ] spids: [13182] ) (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 13201] ) ] spids: [16777215 13239] ) ] spids: [13128 13242] ) spids: [13122 13126] ) (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: [13302] ) ] spids: [13302] ) (C {(p666_handle_remote_response)} {(DQ ('Cube execution'))}) ] spids: [16777215 13265] ) ] spids: [16777215 13313] ) (C {(p666_exit)} {(0)}) ] spids: [16777215 10294] ) ] spids: [16777215 13322] ) ] spids: [16777215 7351] ) ] spids: [16777215 13324] ) ] )