qvm-move-to-vm: Remove duplicated code

This commit is contained in:
Rusty Bird 2016-02-13 15:22:34 +00:00
parent d181cf5cff
commit 3f600d03fa
No known key found for this signature in database
GPG Key ID: 469D78F47AAF2ADF

View File

@ -20,25 +20,6 @@
# #
# #
if [ $# -lt 2 ] ; then
echo usage: $0 '[--without-progress] dest_vmname file [file]+'
exit 1
fi
if [ x"$1" = "x--without-progress" ] ; then
export PROGRESS_TYPE=none
shift
else
export PROGRESS_TYPE=console
fi
VM="$1"
shift
if [ $PROGRESS_TYPE = console ] ; then
export FILECOPY_TOTAL_SIZE=$(du --apparent-size -c -- "$@" 2> /dev/null | tail -1 | cut -f 1)
fi
set -e set -e
/usr/lib/qubes/qrexec-client-vm $VM qubes.Filecopy /usr/lib/qubes/qfile-agent "$@" . qvm-copy-to-vm "$@"
rm -rf "$@" rm -rf "$@"