(command.CommandList
  children: [
    (C {<Id.KW_Set set>} {<-e>})
    (C {<mkdir>} {<-p>} 
      {
        (DQ 
          (command_sub
            left_token: <Id.Left_DollarParen '$('>
            child: (C {<dirname>} {(DQ ($ Id.VSub_Number '$0'))})
          )
        ) <'/../deps/scratch'>
      }
    )
    (C {<cd>} 
      {
        (DQ 
          (command_sub
            left_token: <Id.Left_DollarParen '$('>
            child: (C {<dirname>} {(DQ ($ Id.VSub_Number '$0'))})
          )
        ) <'/../deps/scratch'>
      }
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CMAKE_VERSION_MAJOR)
          op: assign_op.Equal
          rhs: {<3>}
          spids: [49]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CMAKE_VERSION_MINOR)
          op: assign_op.Equal
          rhs: {<7>}
          spids: [52]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CMAKE_VERSION_PATCH)
          op: assign_op.Equal
          rhs: {<1>}
          spids: [55]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CMAKE_VERSION_MAJMIN)
          op: assign_op.Equal
          rhs: 
            {($ Id.VSub_DollarName '$CMAKE_VERSION_MAJOR') <.> 
              ($ Id.VSub_DollarName '$CMAKE_VERSION_MINOR')
            }
          spids: [58]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CMAKE_VERSION)
          op: assign_op.Equal
          rhs: 
            {($ Id.VSub_DollarName '$CMAKE_VERSION_MAJMIN') <.> 
              ($ Id.VSub_DollarName '$CMAKE_VERSION_PATCH')
            }
          spids: [63]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CMAKE_SHA256_DARWIN)
          op: assign_op.Equal
          rhs: {<1851d1448964893fdc5a8c05863326119f397a3790e0c84c40b83499c7960267>}
          spids: [78]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CMAKE_SHA256_LINUX)
          op: assign_op.Equal
          rhs: {<7b4b7a1d9f314f45722899c0521c261e4bfab4a6b532609e37fef391da6bade2>}
          spids: [81]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PLATFORM)
          op: assign_op.Equal
          rhs: 
            {
              (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<uname>})) <-> 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: (C {<uname>} {<-m>})
                )
              )
            }
          spids: [85]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FULLNAME)
          op: assign_op.Equal
          rhs: 
            {<cmake-> ($ Id.VSub_DollarName '$CMAKE_VERSION') <-> ($ Id.VSub_DollarName '$PLATFORM')}
          spids: [98]
        )
      ]
    )
    (command.Case
      to_match: {($ Id.VSub_DollarName '$PLATFORM')}
      arms: [
        (case_arm
          pat_list: [{<Darwin-x86_64>}]
          action: [
            (C {<'../tools/jldownload'>} 
              {<https> <Id.Lit_Colon ':'> <'//cmake.org/files/v'> 
                ($ Id.VSub_DollarName '$CMAKE_VERSION_MAJMIN') <'/'> ($ Id.VSub_DollarName '$FULLNAME') <.tar.gz>
              }
            )
            (command.Pipeline
              children: [
                (C {<echo>} 
                  {
                    (DQ ($ Id.VSub_DollarName '$CMAKE_SHA256_DARWIN') <'  '> 
                      ($ Id.VSub_DollarName '$FULLNAME') <.tar.gz>
                    )
                  }
                )
                (C {<shasum>} {<-a>} {<256>} {<-c>} {<->})
              ]
              negated: F
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:CMAKE_EXTRACTED_PATH)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$FULLNAME') <'/CMake.app/Contents/bin/cmake'>}
                  spids: [148]
                )
              ]
            )
          ]
          spids: [111 112 151 -1]
        )
        (case_arm
          pat_list: [{<Linux-x86_64>}]
          action: [
            (C {<'../tools/jldownload'>} 
              {<https> <Id.Lit_Colon ':'> <'//cmake.org/files/v'> 
                ($ Id.VSub_DollarName '$CMAKE_VERSION_MAJMIN') <'/'> ($ Id.VSub_DollarName '$FULLNAME') <.tar.gz>
              }
            )
            (command.Pipeline
              children: [
                (C {<echo>} 
                  {
                    (DQ ($ Id.VSub_DollarName '$CMAKE_SHA256_LINUX') <'  '> 
                      ($ Id.VSub_DollarName '$FULLNAME') <.tar.gz>
                    )
                  }
                )
                (C {<sha256sum>} {<-c>} {<->})
              ]
              negated: F
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:CMAKE_EXTRACTED_PATH)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName '$FULLNAME') <'/bin/cmake'>}
                  spids: [187]
                )
              ]
            )
          ]
          spids: [154 155 190 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (command.Simple
              words: [
                {<echo>}
                {(DQ <'This script only supports x86_64 Mac and Linux. For other platforms,'>)}
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'get cmake from your package manager or compile it from source.'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [193 194 220 -1]
        )
      ]
    )
    (C {<tar>} {<-xzf>} {($ Id.VSub_DollarName '$FULLNAME') <.tar.gz>})
    (command.Simple
      words: [
        {<echo>}
        {
          (DQ <'CMAKE = '> ($ Id.VSub_DollarName '$PWD') <'/'> 
            ($ Id.VSub_DollarName '$CMAKE_EXTRACTED_PATH')
          )
        }
      ]
      redirects: [(redir op:<Id.Redir_DGreat '>>'> loc:(redir_loc.Fd fd:1) arg:{<'../../Make.user'>})]
      do_fork: T
    )
  ]
)