2018-05-03 12:41:31 -04:00
|
|
|
#!/bin/bash
|
|
|
|
# qvm-copy-to-vm2
|
|
|
|
# Copy a file from dom0 to a specific location in an AppVM
|
|
|
|
# qvm-copy-to-dom0 <Source in dom0> <AppVM> <Destination in dom0>
|
|
|
|
|
|
|
|
# command line parameters
|
2021-05-30 08:37:16 -04:00
|
|
|
Source="$1" # must be present
|
|
|
|
AppVM="$2" # must be present
|
|
|
|
Destination="$3" # must be present
|
2018-05-03 12:41:31 -04:00
|
|
|
|
|
|
|
# if no Destination given on commandline use /home/user/QubesIncoming
|
2021-05-30 08:37:16 -04:00
|
|
|
if [ -z "$Destination" ];then Destination="/home/user/QubesIncoming"; fi
|
2018-05-03 12:41:31 -04:00
|
|
|
|
|
|
|
# copy file from dom0 to AppVM
|
2021-05-30 08:37:16 -04:00
|
|
|
qvm-run --pass-io $AppVM "cat -- \"$Source\"" > "$Destination"
|