SHA256
use local keywords only once for version variable
This commit is contained in:
@@ -112,12 +112,12 @@ function cleanup_tmpdir() {
|
||||
|
||||
function install_proxmox_backup_client() {
|
||||
local update=${1:-false}
|
||||
local version
|
||||
|
||||
[ -f "$PBC" ] && local installed=true || local installed=false
|
||||
! $installed && update=false
|
||||
|
||||
if $installed && ! $update; then
|
||||
local version
|
||||
version=$(pbc-version) || return 10
|
||||
echo "Info: skip installation of proxmox-backup-client, already installed ($version)"
|
||||
return 0
|
||||
@@ -154,7 +154,7 @@ function install_proxmox_backup_client() {
|
||||
echo "Info: copying proxmox-backup-client static binary to $PBC ..."
|
||||
! cp "$TMPDIR/usr/bin/proxmox-backup-client" "$PBC" && echo "Error copying binary!" >&2 && return 60
|
||||
|
||||
local version=$(pbc-version) || return $?
|
||||
version=$(pbc-version) || return $?
|
||||
$update && action='updated' || action='installed'
|
||||
echo "Info: successfully $action proxmox-backup-$version"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user