(command.BraceGroup
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:LANG)
          op: assign_op.Equal
          rhs: {<en_GB.UTF-8>}
          spids: [87]
        )
      ]
    )
    (C {<cd>} {(DQ ($ Id.VSub_DollarName '$HOME'))})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:INPUT)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [104]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_EqualTilde
                      left: {($ Id.VSub_Number '$1')}
                      right: 
                        {<Id.Lit_Other '^'> <-> <Id.Lit_Other '?'> <Id.Lit_Other '['> <0-9> 
                          <Id.Lit_Other ']'> <Id.Lit_Other '+'> <Id.Lit_Other '$'>
                        }
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:INPUT)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [133]
                )
              ]
            )
          ]
          spids: [109 129]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FILEPATH_RAM)
          op: assign_op.Equal
          rhs: {(DQ </DietPi>)}
          spids: [155]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:FILEPATH_DISK)
          op: assign_op.Equal
          rhs: {(DQ </boot>)}
          spids: [161]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:aFILE_BOOT_INI)
          op: assign_op.Equal
          rhs: 
            {
              (sh_array_literal
                left: <Id.Op_LParen _>
                words: [{(SQ <dietpi.txt>)} {(SQ <config.txt>)} {(SQ <boot.ini>)} {(SQ <uEnv.txt>)}]
              )
            }
          spids: [172]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: 
                    (arith_expr.Binary
                      op_id: Id.Arith_DEqual
                      left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$INPUT')})
                      right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>})
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} {</DietPi/.ramdisk>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<echo>} {<-e>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            command_list: (command.CommandList children:[(C {<date>})])
                          ) <' | DietPi-Ramdisk: Starting'>
                        )
                      }
                    )
                    (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_RAM')) </dietpi>})
                    (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_RAM')) </dietpi/conf>})
                    (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_RAM')) </dietpi/func>})
                    (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_RAM')) </dietpi/misc>})
                    (command.ForExpr
                      init: 
                        (arith_expr.BinaryAssign
                          op_id: Id.Arith_Equal
                          left: (sh_lhs_expr.Name name:i)
                          right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>})
                        )
                      cond: 
                        (arith_expr.Binary
                          op_id: Id.Arith_Less
                          left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>)
                          right: 
                            (arith_expr.ArithWord
                              w: 
                                {
                                  (braced_var_sub
                                    token: <Id.VSub_Name aFILE_BOOT_INI>
                                    prefix_op: (Id.VSub_Pound)
                                    bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                                  )
                                }
                            )
                        )
                      update: 
                        (arith_expr.UnaryAssign
                          op_id: Id.Node_PostDPlus
                          child: (sh_lhs_expr.Name name:i)
                        )
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {<-f>} 
                                          {
                                            (DQ ($ Id.VSub_DollarName '$FILEPATH_DISK') </> 
                                              (braced_var_sub
                                                token: <Id.VSub_Name aFILE_BOOT_INI>
                                                bracket_op: 
                                                  (bracket_op.ArrayIndex
                                                    expr: 
                                                      (arith_expr.ArithWord
                                                        w: {($ Id.VSub_DollarName '$i')}
                                                      )
                                                  )
                                              )
                                            )
                                          } {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                  action: [
                                    (C {<cp>} 
                                      {(DQ ($ Id.VSub_DollarName '$FILEPATH_DISK')) </> 
                                        (braced_var_sub
                                          token: <Id.VSub_Name aFILE_BOOT_INI>
                                          bracket_op: 
                                            (bracket_op.ArrayIndex
                                              expr: 
                                                (arith_expr.ArithWord
                                                  w: {($ Id.VSub_DollarName '$i')}
                                                )
                                            )
                                        )
                                      } {(DQ ($ Id.VSub_DollarName '$FILEPATH_RAM')) </>}
                                    )
                                    (C {<sed>} {<-i>} 
                                      {
                                        (single_quoted
                                          left: <Id.Left_SingleQuoteC "$'">
                                          tokens: [
                                            <Id.Char_Literals s/>
                                            <Id.Char_OneChar '\\r'>
                                            <Id.Char_Literals '$//'>
                                          ]
                                        )
                                      } 
                                      {(DQ ($ Id.VSub_DollarName '$FILEPATH_RAM')) </> 
                                        (braced_var_sub
                                          token: <Id.VSub_Name aFILE_BOOT_INI>
                                          bracket_op: 
                                            (bracket_op.ArrayIndex
                                              expr: 
                                                (arith_expr.ArithWord
                                                  w: {($ Id.VSub_DollarName '$i')}
                                                )
                                            )
                                        )
                                      }
                                    )
                                  ]
                                  spids: [343 363]
                                )
                              ]
                            )
                          ]
                        )
                    )
                    (C {<cp>} {<-Rf>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_DISK')) </dietpi>} 
                      {(DQ ($ Id.VSub_DollarName '$FILEPATH_RAM')) </>}
                    )
                    (C {<chmod>} {<-R>} {<Id.Lit_Other '+'> <x>} 
                      {(DQ ($ Id.VSub_DollarName '$FILEPATH_RAM'))}
                    )
                    (command.Simple
                      words: [{<echo>} {<-e>} {(DQ <0>)}]
                      redirects: [
                        (redir.Redir
                          op: <Id.Redir_Great '>'>
                          fd: -1
                          arg_word: {</DietPi/.ramdisk>}
                        )
                      ]
                    )
                    (C {<echo>} {<-e>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            command_list: (command.CommandList children:[(C {<date>})])
                          ) <' | DietPi-Ramdisk: Completed'>
                        )
                      }
                    )
                  ]
                  spids: [235 248]
                )
              ]
              else_action: [
                (C {<echo>} {<-e>} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        command_list: (command.CommandList children:[(C {<date>})])
                      ) <' | DietPi-Ramdisk: Already running'>
                    )
                  }
                )
              ]
            )
          ]
          spids: [217 231]
        )
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DParen
                  child: 
                    (arith_expr.Binary
                      op_id: Id.Arith_DEqual
                      left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$INPUT')})
                      right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (C {<echo>} {<-e>} 
              {
                (DQ 
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    command_list: (command.CommandList children:[(C {<date>})])
                  ) <' | DietPi-Ramdisk: Stopping'>
                )
              }
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {<-f>} {</DietPi/.ramdisk>} {<Id.Lit_RBracket ']'>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} 
                                  {</DietPi/dietpi/boot>} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<echo>} {<-e>} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: <Id.Left_DollarParen '$('>
                                    command_list: (command.CommandList children:[(C {<date>})])
                                  ) <' | DietPi-Ramdisk: Error - /DietPi/dietpi/boot is missing, aborting...'>
                                )
                              }
                            )
                          ]
                          spids: [561 574]
                        )
                      ]
                      else_action: [
                        (C {<cp>} {<-Rf>} 
                          {(DQ ($ Id.VSub_DollarName '$FILEPATH_RAM')) </> <Id.Lit_Star '*'>} {</boot/>}
                        )
                        (command.Simple
                          words: [{<rm>} {</DietPi/.ramdisk>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_AndGreat '&>'>
                              fd: -1
                              arg_word: {</dev/null>}
                            )
                          ]
                        )
                      ]
                    )
                    (C {<echo>} {<-e>} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Id.Left_DollarParen '$('>
                            command_list: (command.CommandList children:[(C {<date>})])
                          ) <' | DietPi-Ramdisk: Completed'>
                        )
                      }
                    )
                  ]
                  spids: [546 557]
                )
              ]
              else_action: [
                (C {<echo>} {<-e>} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        command_list: (command.CommandList children:[(C {<date>})])
                      ) <' | DietPi-Ramdisk: Is not currently running'>
                    )
                  }
                )
              ]
            )
          ]
          spids: [515 529]
        )
      ]
    )
    (C {<sync>})
    (C {<unset>} {<aFILE_BOOT_INI>})
    (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
  ]
)