fix again suppress latest links. avoid remote targets

fix created error where no sshargs does not add ssh command
master
David Kebler 2024-03-20 11:26:55 -07:00
parent d3802572b5
commit 057b8ad9dd
2 changed files with 6 additions and 3 deletions

View File

@ -72,9 +72,12 @@ echo making .latest symlinks in each destination
for dest in $dests; do
for snap in $latest; do
# [[ -e $dest/${snap%%.*}.latest ]] && $dry_run_echo sudo rm $dest/${snap%%.*}.latest
local cmd="sudo ln -srfn $dest/$snap $dest/${snap%%.*}.latest"
# TODO only do latest links for locally mounted
if [[ -d $dest/$snap ]]; then
local cmd="sudo ln -srfn $dest/$snap $dest/${snap%%.*}.latest 2> /dev/null"
echo $cmd
[[ ! $dry_run ]] && $cmd >&2 /dev/null
[[ ! $dry_run ]] && $cmd
fi
done
done

View File

@ -187,7 +187,7 @@ EOF
args+=("${@:1}")
fi
[[ $DHOST || $SHOST ]] && [[ $sshargs ]] && args+=( "$(remove_end_spaces "-e '$(ssh -l "${sshargs[*]}")'")")
[[ $DHOST || $SHOST ]] && args+=( "$(remove_end_spaces "-e '$(ssh -l "${sshargs[*]}")'")")
# assemble options