(BraceGroup children: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:INPUT) op:assign_op.Equal rhs:{<0>} spids:[78])] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (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: [106] ) ] ) ] spids: [82 102] ) ] ) (C {<.>} {<'/DietPi/dietpi/func/dietpi-globals'>}) (C {<G_CHECK_ROOT_USER>}) (C {<G_CHECK_ROOTFS_RW>}) (C {<export>} {<Id.Lit_VarLike 'G_PROGRAM_NAME='> (SQ <DietPi-Update>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GITBRANCH) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<grep>} {<-m1>} {(SQ <'^DEV_GITBRANCH='>)} {<'/DietPi/dietpi.txt'>}) (C {<sed>} {(SQ <'s/.*=//'>)}) ] negated: F ) ) } spids: [155] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GITFORKOWNER) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<grep>} {<-m1>} {(SQ <'^DEV_GITOWNER='>)} {<'/DietPi/dietpi.txt'>}) (C {<sed>} {(SQ <'s/.*=//'>)}) ] negated: F ) ) } spids: [177] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_LOG) op: assign_op.Equal rhs: {(SQ <'/var/tmp/dietpi/logs/dietpi-update.log'>)} spids: [212] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DIETPIUPDATE_COREVERSION_CURRENT) op: assign_op.Equal rhs: {<6>} spids: [218] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FILEPATH_TEMP) op: assign_op.Equal rhs: {(DQ <'/tmp/dietpi-update'>)} spids: [226] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SERVER_ONLINE) op: assign_op.Equal rhs: {<0>} spids: [233] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:UPDATE_AVAILABLE) op: assign_op.Equal rhs: {<0>} spids: [237] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:UPDATE_REQUIRESNEWIMAGE) op: assign_op.Equal rhs: {<0>} spids: [241] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RUN_UPDATE) op: assign_op.Equal rhs: {<0>} spids: [245] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COREVERSION_CURRENT) op: assign_op.Equal rhs: {<0>} spids: [250] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SUBVERSION_CURRENT) op: assign_op.Equal rhs: {<0>} spids: [254] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COREVERSION_SERVER) op: assign_op.Equal rhs: {<0>} spids: [259] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SUBVERSION_SERVER) op: assign_op.Equal rhs: {<0>} spids: [263] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:URL_MIRROR_INDEX) op: assign_op.Equal rhs: {<0>} spids: [268] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:URL_MIRROR_SERVERVERSION) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ <'http://dietpi.com/downloads/dietpi-update_mirror/'> ($ Id.VSub_DollarName '$GITBRANCH') <'/server_version-6'> ) } { (DQ <'https://raw.githubusercontent.com/'> (braced_var_sub token: <Id.VSub_Name GITFORKOWNER> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<Fourdee>}) ) <'/DietPi/'> ($ Id.VSub_DollarName '$GITBRANCH') <'/dietpi/server_version-6'> ) } ] ) } spids: [272] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:URL_MIRROR_ZIP) op: assign_op.Equal rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ <'http://dietpi.com/downloads/dietpi-update_mirror/'> ($ Id.VSub_DollarName '$GITBRANCH') <'/DietPi-'> ($ Id.VSub_DollarName '$GITBRANCH') <.zip> ) } { (DQ <'https://github.com/'> (braced_var_sub token: <Id.VSub_Name GITFORKOWNER> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<Fourdee>}) ) <'/DietPi/archive/'> ($ Id.VSub_DollarName '$GITBRANCH') <.zip> ) } ] ) } spids: [302] ) ] ) (command.ShFunction name: Get_Client_Version body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COREVERSION_CURRENT) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<sed>} {<-n>} {<1p>} {<'/DietPi/dietpi/.version'>}) ) } spids: [341] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SUBVERSION_CURRENT) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<sed>} {<-n>} {<2p>} {<'/DietPi/dietpi/.version'>}) ) } spids: [353] ) ] ) ] ) ) (command.ShFunction name: Get_Server_Version body: (BraceGroup children: [ (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike i> right: { (braced_var_sub token: <Id.VSub_Name URL_MIRROR_SERVERVERSION> 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:<Id.Lit_ArithVarLike i>) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:URL_MIRROR_INDEX) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$i')} spids: [410] ) ] ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Checking Mirror : '> (braced_var_sub token: <Id.VSub_Name URL_MIRROR_SERVERVERSION> bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName '$i')}) ) ) } ) (command.Simple words: [ {<curl>} {<-k>} {<-L>} { (braced_var_sub token: <Id.VSub_Name URL_MIRROR_SERVERVERSION> bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName '$i')}) ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP')) <'/server_version'>} ) ] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_QMark '$?')} right: {<Id.Lit_Digits 0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COREVERSION_SERVER) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<sed>} {<-n>} {<1p>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP')) <'/server_version'> } ) ) } spids: [473] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SUBVERSION_SERVER) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<sed>} {<-n>} {<2p>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP')) <'/server_version'> } ) ) } spids: [488] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {($ Id.VSub_DollarName '$SUBVERSION_SERVER')} 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:SERVER_ONLINE) op: assign_op.Equal rhs: {<1>} spids: [532] ) ] ) (C {<G_DIETPI-NOTIFY>} {<0>} { (DQ <'Using update server: '> (braced_var_sub token: <Id.VSub_Name URL_MIRROR_SERVERVERSION> bracket_op: (bracket_op.ArrayIndex expr: {($ Id.VSub_DollarName '$i')} ) ) ) } ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [508 528] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<2>} {(DQ <'Invalid server version and/or update file unavailable'>)} ) ] ) ] spids: [451 465] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'No response from: '> (braced_var_sub token: <Id.VSub_Name URL_MIRROR_SERVERVERSION> bracket_op: (bracket_op.ArrayIndex expr:{($ Id.VSub_DollarName '$i')}) ) ) } ) ] ) ] ) ) ] ) ) (command.ShFunction name: Check_Update_Available body: (BraceGroup children: [ (command.Simple words: [{<rm>} {<'/DietPi/dietpi/.update_available'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:{($ Id.VSub_DollarName '$SERVER_ONLINE')}) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: { ($ Id.VSub_DollarName '$DIETPIUPDATE_COREVERSION_CURRENT' ) } right: {($ Id.VSub_DollarName '$COREVERSION_SERVER')} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:UPDATE_REQUIRESNEWIMAGE) op: assign_op.Equal rhs: {<1>} spids: [667] ) ] ) (command.Simple words: [{<echo>} {<-e>} {(DQ <-1>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/DietPi/dietpi/.update_available'>} ) ] do_fork: T ) ] spids: [649 663] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: {($ Id.VSub_DollarName '$SUBVERSION_CURRENT')} right: {($ Id.VSub_DollarName '$SUBVERSION_SERVER')} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:UPDATE_AVAILABLE) op: assign_op.Equal rhs: {<1>} spids: [707] ) ] ) (C {<echo>} {<-e>} {(DQ )}) (C {<G_DIETPI-NOTIFY>} {<0>} {(DQ <'Update available'>)}) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Current Version : '> ($ Id.VSub_DollarName '$COREVERSION_CURRENT') <.> ($ Id.VSub_DollarName '$SUBVERSION_CURRENT') ) } ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Server Version : '> ($ Id.VSub_DollarName '$COREVERSION_SERVER') <.> ($ Id.VSub_DollarName '$SUBVERSION_SERVER') ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<_EOF_>} here_end_span_id: 772 stdin_parts: [ ($ Id.VSub_DollarName '$COREVERSION_SERVER') <.> ($ Id.VSub_DollarName '$SUBVERSION_SERVER') <'\n'> ] ) ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/DietPi/dietpi/.update_available'>} ) ] do_fork: T ) ] spids: [689 703] ) ] ) ] spids: [631 641] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ < 'Unable to access update servers. Please check your connection, then run dietpi-update again.' > ) } ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_BACKTITLE) op: assign_op.Equal rhs: {(SQ <DietPi-Update>)} spids: [818] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$WHIP_BACKTITLE')} spids: [824] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {<0>} spids: [828] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: {<0>} spids: [832] ) ] ) (command.ShFunction name: Menu_Update body: (BraceGroup children: [ (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--yesno>} { (DQ <'Update available : https://goo.gl/G9ikqn\n'> <'Installed version : '> ($ Id.VSub_DollarName '$COREVERSION_CURRENT') <.> ($ Id.VSub_DollarName '$SUBVERSION_CURRENT') <'\n'> <'Latest version : '> ($ Id.VSub_DollarName '$COREVERSION_SERVER') <.> ($ Id.VSub_DollarName '$SUBVERSION_SERVER') <'\n'> <'\n'> <'---------------------------------Notice-------------------------------------\n'> < 'The benefit of DietPi is we use standard linux configurations and commands. The downside is we can\'t possibly accommodate or predict, every modifcation to Linux configurations files by the end user, during the update.\n' > <'\n'> < 'Although we test the updates thoroughly, if you have made custom changes to Linux configuration files, outside of the DietPi programs, we highly recommend you create a backup of your system, before updating.\n' > <'\n'> <'You can create a system backup, by running:\n'> <' - dietpi-backup\n'> <'----------------------------------------------------------------------------\n'> <'\n'> <'Do you wish to continue and update DietPi to v'> ($ Id.VSub_DollarName '$COREVERSION_SERVER') <.> ($ Id.VSub_DollarName '$SUBVERSION_SERVER') <'?'> ) } {<--yes-button>} {(DQ <Ok>)} {<--no-button>} {(DQ <Exit>)} {<--defaultno>} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$WHIP_BACKTITLE'))} {<24>} {<80>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [908] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_DollarName '$CHOICE')} right: {<Id.Lit_Digits 0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RUN_UPDATE) op: assign_op.Equal rhs: {<1>} spids: [930] ) ] ) ] spids: [912 926] ) ] ) ] ) ) (command.ShFunction name: Run_Update body: (BraceGroup children: [ (command.Simple words: [ {<curl>} {<-k>} {<-L>} { (braced_var_sub token: <Id.VSub_Name URL_MIRROR_ZIP> bracket_op: (bracket_op.ArrayIndex expr: {($ Id.VSub_DollarName '$URL_MIRROR_INDEX')} ) ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP')) <'/update.zip'>} ) ] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_QMark '$?')} right: {<Id.Lit_Digits 0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<unzip>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP')) <'/update.zip'>} {<-d>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP')) <'/'>} ) (command.Simple words: [ {<rm>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP')) <'/DietPi-'> (DQ ($ Id.VSub_DollarName '$GITBRANCH')) <'/dietpi/.'> <Id.Lit_Star '*'> } ] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<cp>} {<-Rf>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP')) <'/DietPi-'> (DQ ($ Id.VSub_DollarName '$GITBRANCH')) <'/dietpi'> } {<'/DietPi/'>} ) (C {<chmod>} {<-R>} {<Id.Lit_Other '+'> <x>} {<'/DietPi'>}) (C {<'/DietPi/dietpi/func/dietpi-set_software'>} {<verify_dietpi.txt>}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: {($ Id.VSub_DollarName '$SUBVERSION_CURRENT')} right: {($ Id.VSub_DollarName '$SUBVERSION_SERVER')} ) ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (C {<G_DIETPI-NOTIFY>} {<3>} {(SQ <'DietPi-Update Updating DietPi'>)}) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Current Version : '> ($ Id.VSub_DollarName '$COREVERSION_CURRENT') <.> ($ Id.VSub_DollarName '$SUBVERSION_CURRENT') ) } ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Server Version : '> ($ Id.VSub_DollarName '$COREVERSION_SERVER') <.> ($ Id.VSub_DollarName '$SUBVERSION_SERVER') <Id.Lit_BadBackslash '\\'> <n> ) } ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Patching '> ($ Id.VSub_DollarName '$COREVERSION_CURRENT') <.> ($ Id.VSub_DollarName '$SUBVERSION_CURRENT') <' to '> ($ Id.VSub_DollarName '$COREVERSION_CURRENT') <.> (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: {($ Id.VSub_DollarName '$SUBVERSION_CURRENT')} right: {<Id.Lit_Digits 1>} ) ) ) } ) (C {<'/DietPi/dietpi/patch_file'>} {($ Id.VSub_DollarName '$SUBVERSION_CURRENT')} {($ Id.VSub_DollarName '$SUBVERSION_SERVER')} ) (command.DParen child: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike SUBVERSION_CURRENT> ) ) (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<_EOF_>} here_end_span_id: 1228 stdin_parts: [ ($ Id.VSub_DollarName '$COREVERSION_CURRENT') <'\n'> ($ Id.VSub_DollarName '$SUBVERSION_CURRENT') <'\n'> ] ) ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/DietPi/dietpi/.version'>} ) ] do_fork: T ) (C {<G_DIETPI-NOTIFY>} {<0>} { (DQ <'Patch '> ($ Id.VSub_DollarName '$COREVERSION_CURRENT') <.> ($ Id.VSub_DollarName '$SUBVERSION_CURRENT') <' completed'> <Id.Lit_BadBackslash '\\'> <n> ) } ) (C {<Get_Client_Version>}) ] ) ) (command.Simple words: [{<rm>} {<'/DietPi/dietpi/patch_file'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<rm>} {<'/DietPi/dietpi/server_version'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<rm>} {<-R>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP'))}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] spids: [988 1002] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ < 'Download failed, unable to run update. Please try running dietpi-update again.' > ) } ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ] ) ) (C {<G_DIETPI-NOTIFY>} {<3>} {<DietPi-Update>} {(SQ <'Checking for DietPi updates'>)}) (command.Simple words: [{<rm>} {<-R>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP'))}] redirects: [(redir op:<Id.Redir_AndGreat '&>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})] do_fork: T ) (command.Simple words: [{<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP'))}] redirects: [(redir op:<Id.Redir_AndGreat '&>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})] do_fork: T ) (C {<Get_Client_Version>}) (C {<Get_Server_Version>}) (C {<Check_Update_Available>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_DollarName '$INPUT')} right: {<Id.Lit_Digits 2>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} {<-e>} {(DQ <'Do nothing, now contained within Check_Update_Available()'>)} ] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] spids: [1425 1439] ) ] else_action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_DollarName '$SERVER_ONLINE')} right: {<Id.Lit_Digits 0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<whiptail>} {<--title>} {(DQ <'Error - Server Offline'>)} {<--msgbox>} { (DQ <'http://github.com is either offline, or, unable to connect '> <Id.Lit_BadBackslash '\\'> <'n '> <Id.Lit_BadBackslash '\\'> <'n No updates applied.'> ) } {<12>} {<60>} ) ] spids: [1477 1491] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_DollarName '$UPDATE_REQUIRESNEWIMAGE')} right: {<Id.Lit_Digits 1>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<whiptail>} {<--title>} {(DQ <'New image required'>)} {<--msgbox>} { (DQ <' Your version of DietPi is now obsolete and cannot be updated. '> <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <'n Please download the latest DietPi image:'> <Id.Lit_BadBackslash '\\'> <'n - http://dietpi.com/downloads/images '> <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <'n - Current Version : '> ($ Id.VSub_DollarName '$SUBVERSION_CURRENT') <' '> <Id.Lit_BadBackslash '\\'> <'n - Server Version : '> ($ Id.VSub_DollarName '$SUBVERSION_SERVER') <' '> <Id.Lit_BadBackslash '\\'> <'n '> ) } {<13>} {<70>} ) (C {<G_DIETPI-NOTIFY>} {<1>} {(DQ <'Your version of DietPi is now obsolete and cannot be updated.'>)} ) (C {<echo>} {<-e>} { (DQ <'Please download the latest DietPi image:'> <Id.Lit_BadBackslash '\\'> <'n - http://dietpi.com/download '> <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <'n - Current Version : '> ($ Id.VSub_DollarName '$SUBVERSION_CURRENT') <' '> <Id.Lit_BadBackslash '\\'> <'n - Server Version : '> ($ Id.VSub_DollarName '$SUBVERSION_SERVER') <' '> <Id.Lit_BadBackslash '\\'> <'n '> ) } ) ] spids: [1523 1537] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_DollarName '$UPDATE_AVAILABLE')} right: {<Id.Lit_Digits 1>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<'/DietPi/dietpi/dietpi-drive_manager'>} {<2>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_NEqual left: {($ Id.VSub_QMark '$?')} right: {<Id.Lit_Digits 0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {<1>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] spids: [1647 1661] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_DollarName '$INPUT')} right: {<Id.Lit_Digits 1>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<G_DIETPI-NOTIFY>} {<0>} {(DQ <'Updates have been found and are being applied, please wait...'>)} ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Current Version : '> ($ Id.VSub_DollarName '$COREVERSION_CURRENT') <.> ($ Id.VSub_DollarName '$SUBVERSION_CURRENT') ) } ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Server Version : '> ($ Id.VSub_DollarName '$COREVERSION_SERVER') <.> ($ Id.VSub_DollarName '$SUBVERSION_SERVER') ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RUN_UPDATE) op: assign_op.Equal rhs: {<1>} spids: [1734] ) ] ) ] spids: [1682 1696] ) ] else_action: [(C {<Menu_Update>})] ) ] spids: [1620 1634] ) ] else_action: [ (C {<echo>} {<-e>} {(DQ )}) (C {<G_DIETPI-NOTIFY>} {<0>} { (DQ <'No updates required, your DietPi installation is up to date.'> <Id.Lit_BadBackslash '\\'> <n> ) } ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Current Version : '> ($ Id.VSub_DollarName '$COREVERSION_CURRENT') <.> ($ Id.VSub_DollarName '$SUBVERSION_CURRENT') ) } ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Server Version : '> ($ Id.VSub_DollarName '$COREVERSION_SERVER') <.> ($ Id.VSub_DollarName '$SUBVERSION_SERVER') ) } ) (C {<sleep>} {<2>}) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_DollarName '$RUN_UPDATE')} right: {<Id.Lit_Digits 1>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<'/DietPi/dietpi/dietpi-services'>} {<stop>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-f>} {<'/DietPi/dietpi/.installed'>} {<Id.Lit_RBracket ']'>} ) (command.DParen child: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<cat>} {<'/DietPi/dietpi/.installed'>}) (C {<grep>} {<-ci>} {<-m1>} {(SQ <'^aSOFTWARE_INSTALL_STATE\\[93\\]=2'>)} ) ] negated: F ) ) } ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<systemctl>} {<start>} {<dnsmasq>}) (C {<sleep>} {<2>})] spids: [1856 1893] ) ] ) (command.Simple words: [{<rm>} {(DQ ($ Id.VSub_DollarName '$FP_LOG'))}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Pipeline children: [ (C {<Run_Update>}) (C {<tee>} {<-a>} {(DQ ($ Id.VSub_DollarName '$FP_LOG'))}) ] negated: F ) (command.Simple words: [{<echo>} {<0>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/DietPi/dietpi/.update_stage'>} ) ] do_fork: T ) (command.Simple words: [{<rm>} {<'/DietPi/dietpi/.update_available'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<sync>}) (C {<G_DIETPI-NOTIFY>} {<3>} {<DietPi-Update>} {(DQ <Completed>)}) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Current Version : '> ($ Id.VSub_DollarName '$COREVERSION_CURRENT') <.> ($ Id.VSub_DollarName '$SUBVERSION_CURRENT') ) } ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Server Version : '> ($ Id.VSub_DollarName '$COREVERSION_SERVER') <.> ($ Id.VSub_DollarName '$SUBVERSION_SERVER') ) } ) (C {<G_DIETPI-NOTIFY>} {<0>} {(DQ <'Update completed'>)}) (C {<echo>} {<-e>} {(DQ )}) (C {<echo>} {<-e>} { (DQ <'Please reboot your system now, using the command '> <Id.Lit_BadBackslash '\\'> <'e[31;49;1mreboot'> <Id.Lit_BadBackslash '\\'> <'e[0m'> ) } ) ] spids: [1824 1838] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<ps>} {<aux>}) (C {<grep>} {<-ci>} {<-m1>} {(SQ <'[l]xpanel'>)}) ] negated: F ) ) } right: {<Id.Lit_Digits 1>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<read>} {<-p>} {(DQ <'Press any key to exit DietPi-Update...'>)})] spids: [2062 2092] ) ] ) ] ) (command.Simple words: [{<rm>} {<-R>} {(DQ ($ Id.VSub_DollarName '$FILEPATH_TEMP'))}] redirects: [(redir op:<Id.Redir_AndGreat '&>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})] do_fork: T ) (C {<unset>} {<URL_MIRROR_SERVERVERSION>}) (C {<unset>} {<URL_MIRROR_ZIP>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )