Skip backup questions if specified
This commit is contained in:
parent
bcd45981ff
commit
f43754e807
1 changed files with 23 additions and 21 deletions
|
@ -14,6 +14,7 @@ function backupAction -V dir
|
||||||
|
|
||||||
set -l deployScript (getDeploymentScript)
|
set -l deployScript (getDeploymentScript)
|
||||||
|
|
||||||
|
if [ -z "$VALHALLA_BACKUP_DIR" ]
|
||||||
if fish "$dir/../../../lib/modules/partition/confirm.fish" "Do you wish to store the backup on an SSH server?" n
|
if fish "$dir/../../../lib/modules/partition/confirm.fish" "Do you wish to store the backup on an SSH server?" n
|
||||||
read -xP "Please specify the host name of the SSH server: " VALHALLA_BACKUP_SERVER
|
read -xP "Please specify the host name of the SSH server: " VALHALLA_BACKUP_SERVER
|
||||||
read -xP "Please specify the port of the SSH server (default 22): " VALHALLA_BACKUP_SERVER_PORT
|
read -xP "Please specify the port of the SSH server (default 22): " VALHALLA_BACKUP_SERVER_PORT
|
||||||
|
@ -38,6 +39,7 @@ function backupAction -V dir
|
||||||
end
|
end
|
||||||
|
|
||||||
read -xP "Please specify the path to the directory to save the backup to: " VALHALLA_BACKUP_DIR
|
read -xP "Please specify the path to the directory to save the backup to: " VALHALLA_BACKUP_DIR
|
||||||
|
end
|
||||||
|
|
||||||
runHook backupSoftware || begin
|
runHook backupSoftware || begin
|
||||||
echo "Backing up software..."
|
echo "Backing up software..."
|
||||||
|
|
Loading…
Reference in a new issue