(command.CommandList
  children: [
    (C {(Id.KW_Set set)} {(-euo)} {(pipefail)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:THIS_DIR)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:60)
                command_list: 
                  (command.CommandList
                    children: [
                      (C {(dirname)} 
                        {
                          (DQ 
                            (command_sub
                              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:64)
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(readlink)} {(-f)} 
                                      {
                                        (DQ 
                                          (braced_var_sub
                                            token: (Token id:Id.VSub_Name val:BASH_SOURCE span_id:71)
                                            bracket_op: 
                                              (bracket_op.ArrayIndex
                                                expr: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)})
                                              )
                                          )
                                        )
                                      }
                                    )
                                  ]
                                )
                            )
                          )
                        }
                      )
                    ]
                  )
              )
            }
          spids: [59]
        )
      ]
    )
    (C {(cd)} {(DQ ($ Id.VSub_DollarName '$THIS_DIR'))})
    (C {(../shell/test-packages.sh)} {(-f)})
    (C {(export)} 
      {(Id.Lit_VarLike 'SANDSTORM_DIR=') 
        (DQ 
          (braced_var_sub
            token: (Token id:Id.VSub_Name val:SANDSTORM_DIR span_id:98)
            suffix_op: 
              (suffix_op.Unary
                op_id: Id.VTest_ColonHyphen
                arg_word: {(Id.Lit_Slash /) (opt) (Id.Lit_Slash /) (sandstorm)}
              )
          )
        )
      }
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(test)} {(-e)} {(assets/ssjekyll5.spk)})
        (command.Simple
          words: [{(curl)} {(https) (Id.Lit_Other ':') (//sandstorm.io/apps/ssjekyll5.spk)}]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_Great val:'>' span_id:122)
              fd: -1
              arg_word: {(assets/ssjekyll5.spk)}
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(test)} {(-e)} {(assets/ssjekyll6.spk)})
        (command.Simple
          words: [{(curl)} {(https) (Id.Lit_Other ':') (//sandstorm.io/apps/ssjekyll6.spk)}]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_Great val:'>' span_id:140)
              fd: -1
              arg_word: {(assets/ssjekyll6.spk)}
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(test)} {(-e)} {(assets/ssjekyll7.spk)})
        (command.Simple
          words: [{(curl)} {(https) (Id.Lit_Other ':') (//sandstorm.io/apps/ssjekyll7.spk)}]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_Great val:'>' span_id:158)
              fd: -1
              arg_word: {(assets/ssjekyll7.spk)}
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} 
                  {
                    (DQ 
                      (braced_var_sub
                        token: (Token id:Id.VSub_Name val:TESTCASE span_id:173)
                        suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                      )
                    )
                  } {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:179)
            )
          ]
          action: [
            (command.Simple
              words: [{(read)} {(TESTFILE)} {(TESTNAME)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_TLess val:'<<<' span_id:202)
                  fd: -1
                  arg_word: {(DQ ($ Id.VSub_DollarName '$TESTCASE'))}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$TESTNAME'))} 
                          {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:220)
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NIGHTWATCH_PARAMS)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: (Token id:Id.Op_LParen val:'(' span_id:226)
                                words: [{(-t)} {($ Id.VSub_DollarName '$TESTFILE')}]
                              )
                            }
                          spids: [225]
                        )
                      ]
                    )
                  ]
                  spids: [209 222]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NIGHTWATCH_PARAMS)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (sh_array_literal
                            left: (Token id:Id.Op_LParen val:'(' span_id:237)
                            words: [
                              {(-t)}
                              {($ Id.VSub_DollarName '$TESTFILE')}
                              {(--testcase)}
                              {(DQ ($ Id.VSub_DollarName '$TESTNAME'))}
                            ]
                          )
                        }
                      spids: [236]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SKIP_UNITTESTS)
                  op: assign_op.Equal
                  rhs: {(true)}
                  spids: [253]
                )
              ]
            )
          ]
          spids: [163 181]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Unary
                      op_id: Id.BoolUnary_z
                      child: 
                        {
                          (DQ 
                            (braced_var_sub
                              token: (Token id:Id.VSub_Name val:LAUNCH_URL span_id:267)
                              suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                            )
                          )
                        }
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:273)
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Unary
                              op_id: Id.BoolUnary_z
                              child: 
                                {
                                  (DQ 
                                    (braced_var_sub
                                      token: (Token id:Id.VSub_Name val:SKIP_UNITTESTS span_id:286)
                                      suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                                    )
                                  )
                                }
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:292)
                    )
                  ]
                  action: [
                    (C {(nightwatch)} {(-e)} {(unittests)} 
                      {
                        (DQ 
                          (braced_var_sub
                            token: (Token id:Id.VSub_Name val:NIGHTWATCH_PARAMS span_id:305)
                            bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                            suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                          )
                        )
                      }
                    )
                  ]
                  spids: [278 294]
                )
              ]
            )
            (C {(nightwatch)} {(-e)} {(default)} 
              {
                (DQ 
                  (braced_var_sub
                    token: (Token id:Id.VSub_Name val:NIGHTWATCH_PARAMS span_id:325)
                    bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                    suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                  )
                )
              }
            )
          ]
          spids: [259 275]
        )
      ]
      else_action: [
        (command.Simple
          words: [
            {(sed)}
            {
              (DQ ('s|.*launch_url.*|') 
                (word_part.EscapedLiteral
                  token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:340)
                ) (launch_url) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:342)) 
                (' : ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:344)) 
                ($ Id.VSub_DollarName '$LAUNCH_URL') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:346)) (',|g')
              )
            }
            {(nightwatch.json)}
          ]
          redirects: [
            (redir.Redir
              op: (Token id:Id.Redir_Great val:'>' span_id:352)
              fd: -1
              arg_word: {(nightwatch.tmp.json)}
            )
          ]
        )
        (command.If
          arms: [
            (if_arm
              cond: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_z
                          child: 
                            {
                              (DQ 
                                (braced_var_sub
                                  token: (Token id:Id.VSub_Name val:SKIP_UNITTESTS span_id:365)
                                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                                )
                              )
                            }
                        )
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:371)
                )
              ]
              action: [
                (C {(nightwatch)} {(-e)} {(unittests)} {(-c)} {(./nightwatch.tmp.json)} 
                  {
                    (DQ 
                      (braced_var_sub
                        token: (Token id:Id.VSub_Name val:NIGHTWATCH_PARAMS span_id:388)
                        bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                        suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
                      )
                    )
                  }
                )
              ]
              spids: [357 373]
            )
          ]
        )
        (C {(nightwatch)} {(-e)} {(default)} {(-c)} {(./nightwatch.tmp.json)} 
          {
            (DQ 
              (braced_var_sub
                token: (Token id:Id.VSub_Name val:NIGHTWATCH_PARAMS span_id:412)
                bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:(word.Empty))
              )
            )
          }
        )
      ]
    )
  ]
)