mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-11 22:16:34 +08:00
Reformat file with black
This commit is contained in:
parent
da0ffc48f6
commit
ffe7563583
1 changed files with 9 additions and 9 deletions
|
@ -358,27 +358,27 @@ def auto_upgrader(
|
|||
f'echo "Moving upgraded dist from {upgrade_dist} to {CURRENT_DIR}" >> "{log_file}" 2>&1 & '
|
||||
f'move /Y "{upgrade_dist}" "{CURRENT_DIR}" >> "{log_file}" 2>&1 & '
|
||||
f'echo "Copying optional configuration files from {backup_dist} to {CURRENT_DIR}" >> "{log_file}" 2>&1 & '
|
||||
fr'xcopy /S /Y /I "{backup_dist}\*conf" {CURRENT_DIR} > NUL 2>&1 '
|
||||
f') || ( '
|
||||
rf'xcopy /S /Y /I "{backup_dist}\*conf" {CURRENT_DIR} > NUL 2>&1 '
|
||||
f") || ( "
|
||||
f'echo "Moving current dist failed. Trying to copy it." >> "{log_file}" 2>&1 & '
|
||||
fr'xcopy /S /Y /I "{CURRENT_DIR}\*" "{backup_dist}" >> "{log_file}" 2>&1 & '
|
||||
rf'xcopy /S /Y /I "{CURRENT_DIR}\*" "{backup_dist}" >> "{log_file}" 2>&1 & '
|
||||
f'echo "Now trying to overwrite current dist with upgrade dist" >> "{log_file}" 2>&1 & '
|
||||
f'xcopy /S /Y /I "{upgrade_dist}\*" "{CURRENT_DIR}" >> "{log_file}" 2>&1 '
|
||||
f') & '
|
||||
rf'xcopy /S /Y /I "{upgrade_dist}\*" "{CURRENT_DIR}" >> "{log_file}" 2>&1 '
|
||||
f") & "
|
||||
f'echo "Loading new executable {CURRENT_EXECUTABLE} --check-config {original_args}" >> "{log_file}" 2>&1 & '
|
||||
f'"{CURRENT_EXECUTABLE}" --check-config {original_args} >> "{log_file}" 2>&1 && ( '
|
||||
f'echo "Upgrade successful" >> "{log_file}" 2>&1 & '
|
||||
f'rd /S /Q "{backup_dist}" >> "{log_file}" 2>&1 & '
|
||||
f'del /F /S /Q "{downloaded_archive}" >> "{log_file}" 2>&1 '
|
||||
f') || ( '
|
||||
f") || ( "
|
||||
f'echo "New executable failed. Rolling back" >> "{log_file}" 2>&1 & '
|
||||
f'echo "Moving back files to original place" >> "{log_file}" 2>&1 & '
|
||||
f'rd /S /Q "{CURRENT_DIR}" >> "{log_file}" 2>&1 & '
|
||||
f'move /Y "{backup_dist}" "{CURRENT_DIR}" >> "{log_file}" 2>&1 || ( '
|
||||
f'echo "Moving back method failed. Overwriting back" >> "{log_file}" 2>&1 & '
|
||||
f'copy /S /Y /I "{backup_dist}\*" "{CURRENT_DIR}" >> "{log_file}" 2>&1 '
|
||||
f') '
|
||||
f') & '
|
||||
rf'copy /S /Y /I "{backup_dist}\*" "{CURRENT_DIR}" >> "{log_file}" 2>&1 '
|
||||
f") "
|
||||
f") & "
|
||||
f'echo "Running as initially planned:" >> "{log_file}" 2>&1 & '
|
||||
f'echo "{CURRENT_EXECUTABLE} {original_args}" >> "{log_file}" 2>&1 & '
|
||||
f'{CURRENT_EXECUTABLE}" {original_args} & '
|
||||
|
|
Loading…
Add table
Reference in a new issue