Merge remote-tracking branch 'qubesos/pr/10'

* qubesos/pr/10:
  Use && in qvm-move-to-vm
  qvm-move-to-vm: Use '--' before file arguments
  qvm-move-to-vm: Remove duplicated code
This commit is contained in:
Marek Marczykowski-Górecki 2016-03-14 16:18:41 +01:00
commit d4b637e29d
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -20,25 +20,5 @@
# #
# #
if [ $# -lt 2 ] ; then . qvm-copy-to-vm "$@" &&
echo usage: $0 '[--without-progress] dest_vmname file [file]+' rm -rf -- "$@"
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
/usr/lib/qubes/qrexec-client-vm $VM qubes.Filecopy /usr/lib/qubes/qfile-agent "$@"
rm -rf "$@"