#!/bin/bash

## Copyright (C) 2012 - 2023 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

set -x
set -e
true "INFO: Currently running script: $BASH_SOURCE $@"

dist_build_internal_run="true"

MYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$MYDIR"

source ~/derivative-maker/help-steps/pre
source ~/derivative-maker/help-steps/colors
source ~/derivative-maker/help-steps/variables

trap "exithandler" EXIT

true "${cyan}INFO: rsync test...${reset}"

## Cannot use subdomain.

#rsync --dry-run --recursive --times --quiet rsync://rsync.whonix.org/whonix

rsync-ssl --dry-run --recursive --times --quiet rsync://whonix.org/whonix

## XXX: hardcoded
onion="dds6qkxpwdeubwucdiaord2xgbbeyds25rbsgr73tbfpqpt4a6vjwsyd.onion"
torsocks rsync --dry-run --recursive --times --quiet "rsync://${onion}/whonix"

true "${cyan}INFO: Done with rsync test.${reset}"
