Created
July 21, 2019 23:02
-
-
Save caldempsey/090e44fca8a968d926ae801d3abda612 to your computer and use it in GitHub Desktop.
Script to copy QubesOS from a host VM to domain0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# qvm-copy-to-dom0 | |
# Copy a file from an AppVM to dom0 | |
# qvm-copy-to-dom0 appVM srcPath [ dst ] | |
AppVM=$1 # mandatory | |
Source=$2 # mandatory | |
Destination=$3 # optional (will use ~/QubesIncoming/AppVM/ folder if null) | |
if [ -z "$Destination" ]; then | |
Destination="$HOME/QubesIncoming/$AppVM/$(basename "$Source")" | |
mkdir -p "$HOME/QubesIncoming/$AppVM" | |
fi | |
if [ -e "$Destination" ]; then | |
echo "'$Destination' exists; aborting" >&2 | |
exit 1 | |
fi | |
qvm-run --pass-io $AppVM "cat $Source" > "$Destination" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment