mirror of
https://github.com/Qubes-Community/Contents.git
synced 2025-01-03 11:31:04 -05:00
Fix multiple issues in qvm-copy-to-dom0.sh
Fix multiple issues with filenames containing spaces and starting dashes. The result is not tested by me at all, please check the changes before use.
This commit is contained in:
parent
5971998494
commit
3b3bccbb84
@ -6,13 +6,13 @@
|
|||||||
# Initial author: https://github.com/one7two99/
|
# Initial author: https://github.com/one7two99/
|
||||||
|
|
||||||
# command line parameters
|
# command line parameters
|
||||||
AppVM=$1 # must be present
|
AppVM="$1" # must be present
|
||||||
Source=$2 # must be present
|
Source="$2" # must be present
|
||||||
Destination=$3 # optionally
|
Destination="$3" # optionally
|
||||||
|
|
||||||
# if no Destination given on commandline use ~/QubesIncoming
|
# if no Destination given on commandline use ~/QubesIncoming
|
||||||
if [ -z "$3" ];then mkdir -p ~/QubesIncoming && \
|
if [ -z "$Destination" ];then mkdir -p -- "~/QubesIncoming" && \
|
||||||
Destination=~/QubesIncoming/$(basename $Source); fi
|
Destination="~/QubesIncoming/$(basename "$Source")"; fi
|
||||||
|
|
||||||
# copy file from AppVM to dom0
|
# copy file from AppVM to dom0
|
||||||
qvm-run --pass-io $AppVM "cat $Source" > $Destination
|
qvm-run --pass-io $AppVM "cat -- \"$Source\"" > "$Destination"
|
||||||
|
Loading…
Reference in New Issue
Block a user