• Home
  • Raw
  • Download

Lines Matching refs:head

139 def command_callback(cmd, head, need_del, res=""):  argument
144 check_file_send(cmd_parts[2], cmd_parts[3], head, need_del)
148 check_file_recv(cmd_parts[2], cmd_parts[3], head, need_del)
150 check_install(head, res)
153 check_root(head)
156 check_user(head)
161 def check_file_send(local_file, remote_file, head, need_del): argument
169 " ] && echo yes || echo no\""), head)
172 rm_send_file(remote_file, head, need_del)
175 remote_md5 = get_md5(remote_file, head)
176 rm_send_file(remote_file, head, need_del)
181 def rm_send_file(file_path, head, need_del): argument
183 run_command("{}{}{}{}".format("shell \"rm -rf ", file_path, "\"", head))
186 def check_file_recv(remote_file, local_file, head, need_del): argument
192 remote_md5 = get_md5(remote_file, head)
217 def check_install(head, res): argument
223 res = run_command_stdout("shell \"bm dump -a\"", head)
231 def check_root(head): argument
232 res = run_command_stdout("shell \"whoami\"", head)
237 def check_user(head): argument
238 res = run_command_stdout("shell \"whoami\"", head)
244 def get_devs(head=NORMAL_HEAD): argument
245 res = run_command_stdout(BASIC_COMMANDS['component'][0], head)
267 def run_command(cmd, head=NORMAL_HEAD, need_del=True, need_callback=True): argument
268 command = "{}{}".format(head, cmd)
269 if head != '':
275 command_callback(cmd, head, need_del)
278 def run_command_stdout(cmd, head=NORMAL_HEAD, need_del=True, need_callback=True): argument
279 command = "{}{}".format(head, cmd)
280 if head != '' and 'echo' not in cmd:
283 if head == '':
290 command_callback(cmd, head, need_del, res)
294 def run_commands(cmds, head=NORMAL_HEAD, need_del=True): argument
296 run_command(command, head, need_del)
311 def run_split_commands(commands, head=NORMAL_HEAD): argument
314 run_command_stdout(command, head, False)
316 run_command(command, head, False)
319 def run_device_cmd(head=NORMAL_HEAD): argument
321 head, False)
330 run_split_commands(commands, head)
375 def get_md5(file_path, head=NORMAL_HEAD): argument
376 md5 = run_command_stdout("{}{}{}".format("shell \"md5sum ", file_path, "\""), head)
456 head = "{}{}{}{}".format(server_head, EXTRA_COMMANDS['choose'], dev, " ")
458 PATH['dir_recv']['remote']), head, False)
459 threading.Thread(target=run_split_commands(get_basic_commands(), head)).start()