Merge pull request #134 from jamke/patch-1

Fix multiple issues in qvm-copy-to-dom0.sh
This commit is contained in:
awokd 2021-06-05 18:29:40 +00:00 committed by GitHub
commit 412c4cdc7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,13 +6,13 @@
# Initial author: https://github.com/one7two99/
# command line parameters
AppVM=$1 # must be present
Source=$2 # must be present
Destination=$3 # optionally
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
if [ -z "$Destination" ];then mkdir -p -- "~/QubesIncoming" && \
Destination="~/QubesIncoming/$(basename "$Source")"; fi
# copy file from AppVM to dom0
qvm-run --pass-io $AppVM "cat $Source" > $Destination
qvm-run --pass-io $AppVM "cat -- \"$Source\"" > "$Destination"