mirror of
https://github.com/Qubes-Community/Contents.git
synced 2024-10-01 01:05:51 -04:00
Create qvm-copy-to-dom0.sh
a script which makes it easier to copy a file from an AppVM to dom0
This commit is contained in:
parent
e071297cf2
commit
e7043f715c
18
code/productivity/qvm-copy-to-dom0.sh
Normal file
18
code/productivity/qvm-copy-to-dom0.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# qvm-copy-to-dom0
|
||||||
|
# Copy a file from an AppVM to dom0
|
||||||
|
# script has to be run in dom0
|
||||||
|
# qvm-copy-to-dom0 <AppVM> <Source in AppVM> <Destination in dom0>
|
||||||
|
# Initial author: https://github.com/one7two99/
|
||||||
|
|
||||||
|
# command line parameters
|
||||||
|
AppVM=$1 # must be present
|
||||||
|
Source=$2 # must be present
|
||||||
|
Destination=$3 # optionally
|
||||||
|
|
||||||
|
# if no Destination given on commandline use ~/QubesIncoming
|
||||||
|
if [ -z "$3" ];then mkdir -p ~/QubesIncoming && \
|
||||||
|
Destination=~/QubesIncoming/$(basename $Source); fi
|
||||||
|
|
||||||
|
# copy file from AppVM to dom0
|
||||||
|
qvm-run --pass-io $AppVM "cat $Source" > $Destination
|
Loading…
Reference in New Issue
Block a user