mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-28 10:40:07 +00:00
tweak...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f1ef650bd5
commit
6c109415e7
13
pct-push-r
13
pct-push-r
@ -38,14 +38,15 @@ id=$1
|
||||
from=$2
|
||||
to=$3
|
||||
|
||||
# get from path relative to working directory...
|
||||
if [[ ${from:0:1} != '/' ]] ; then
|
||||
from="$(normpath "$(pwd)/${from}")"
|
||||
fi
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
wd=$(pwd)
|
||||
# get from path relative to working directory...
|
||||
if [[ ${from:0:1} != '/' ]] ; then
|
||||
from="$(normpath "${wd}/${from}")"
|
||||
fi
|
||||
|
||||
dirs=($(find "$from" -type d))
|
||||
for dir in "${dirs[@]}" ; do
|
||||
if [[ "$dir" == "${to}" ]] ; then
|
||||
@ -61,7 +62,7 @@ for file in "${files[@]}" ; do
|
||||
f=$(normpath "${from}/${file}")
|
||||
t=$(normpath "${to}/${file}")
|
||||
[ $QUIET ] \
|
||||
|| echo "copy: \"$f\" -> $id:\"$t\""
|
||||
|| echo "copy: \"${f#${wd}/}\" -> $id:\"$t\""
|
||||
pct push $id "$f" "$t"
|
||||
done
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user