Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 43 lines (32 sloc) 1.2 KB
#!/bin/bash
## Copyright (C) 2012 - 2018 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
## See the file COPYING for copying conditions.
set -x
set -e
true "INFO: Currently running script: $BASH_SOURCE $@"
MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$MYDIR"
cd ..
cd help-steps
source pre
source colors
source variables
export-libvirt-xml() {
sudo $SUDO_OPTS mkdir --parents "$WHONIX_BINARY"
sudo $SUDO_OPTS cp "$libvirt_source_kvm_file" "$libvirt_target_kvm_file"
sudo $SUDO_OPTS cp "$libvirt_source_network_file_external" "$libvirt_target_network_file_external"
sudo $SUDO_OPTS cp "$libvirt_source_network_file_internal" "$libvirt_target_network_file_internal"
}
main() {
root_check
if [ "$WHONIX_BUILD_TYPE" = "whonix-host" ]; then
## There is no such file:
## /home/user/Whonix/packages/whonix-libvirt/usr/share/whonix-libvirt/xml/Whonix-Host.xml
true "${green}INFO: Skipping $BASH_SOURCE, because WHONIX_BUILD_TYPE is '$WHONIX_BUILD_TYPE'.${reset}"
elif [ "$WHONIX_BUILD_QCOW2" = "true" ]; then
export-libvirt-xml "$@"
else
true "${green}INFO: Skipping $BASH_SOURCE, because WHONIX_BUILD_QCOW2 is not set to 'true'.${reset}"
fi
}
main "$@"
You can’t perform that action at this time.