mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-06 03:35:26 +08:00
upgrade_client: Add missing variable substitution
This commit is contained in:
parent
0ac74cec20
commit
7ee603374e
3 changed files with 16 additions and 12 deletions
|
@ -1,11 +1,12 @@
|
||||||
:: Example upgrade script for NPBackup that will be pushed server side
|
:: Example upgrade script for NPBackup that will be pushed server side
|
||||||
|
|
||||||
:: The following variables will be overwritten by the upgrade process
|
:: The following variables will be overwritten by the upgrade process
|
||||||
:: {CURRENT_DIR} - The current directory of the distribution
|
:: {CURRENT_DIR} - The current directory of the distribution
|
||||||
:: {backup_dist} - A directory where we try to move / copy the current distribution
|
:: {backup_dist} - A directory where we try to move / copy the current distribution
|
||||||
:: {upgrade_dist} - The directory where the new distribution is extracted to after download
|
:: {upgrade_dist} - The directory where the new distribution is extracted to after download
|
||||||
:: {log_file} - The log file where the output of this script will be written
|
:: {downloaded_archive} - The path to the downloaded archive
|
||||||
:: {original_args} - The arguments that were passed to the upgrade script
|
:: {log_file} - The log file where the output of this script will be written
|
||||||
|
:: {original_args} - The arguments that were passed to the upgrade script
|
||||||
|
|
||||||
:: Also, I really HATE batch files, from the bottom of my programmer heart
|
:: Also, I really HATE batch files, from the bottom of my programmer heart
|
||||||
:: Every try to write a one-liner batch with some variables and perhaps if statements ?
|
:: Every try to write a one-liner batch with some variables and perhaps if statements ?
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
:: Example upgrade script for NPBackup that will be pushed server side
|
#/usr/bin/env bash
|
||||||
|
# Example upgrade script for NPBackup that will be pushed server side
|
||||||
|
|
||||||
:: The following variables will be overwritten by the upgrade process
|
# The following variables will be overwritten by the upgrade process
|
||||||
:: {CURRENT_DIR} - The current directory of the distribution
|
# {CURRENT_DIR} - The current directory of the distribution
|
||||||
:: {backup_dist} - A directory where we try to move / copy the current distribution
|
# {backup_dist} - A directory where we try to move / copy the current distribution
|
||||||
:: {upgrade_dist} - The directory where the new distribution is extracted to after download
|
# {upgrade_dist} - The directory where the new distribution is extracted to after download
|
||||||
:: {log_file} - The log file where the output of this script will be written
|
# {downloaded_archive} - The path to the downloaded archive
|
||||||
:: {original_args} - The arguments that were passed to the upgrade script
|
# {log_file} - The log file where the output of this script will be written
|
||||||
|
# {original_args} - The arguments that were passed to the upgrade script
|
||||||
|
|
||||||
|
|
||||||
echo "Launching upgrade" >> "{log_file}" 2>&1
|
echo "Launching upgrade" >> "{log_file}" 2>&1
|
||||||
|
|
|
@ -333,6 +333,7 @@ def auto_upgrader(
|
||||||
.replace("{CURRENT_DIR}", CURRENT_DIR)
|
.replace("{CURRENT_DIR}", CURRENT_DIR)
|
||||||
.replace("{CURRENT_EXECUTABLE}", CURRENT_EXECUTABLE)
|
.replace("{CURRENT_EXECUTABLE}", CURRENT_EXECUTABLE)
|
||||||
.replace("{upgrade_dist}", upgrade_dist)
|
.replace("{upgrade_dist}", upgrade_dist)
|
||||||
|
.replace("{downloaded_archive}", downloaded_archive)
|
||||||
.replace("{backup_dist}", backup_dist)
|
.replace("{backup_dist}", backup_dist)
|
||||||
.replace("{log_file}", log_file)
|
.replace("{log_file}", log_file)
|
||||||
.replace("{original_args}", original_args)
|
.replace("{original_args}", original_args)
|
||||||
|
|
Loading…
Add table
Reference in a new issue