#!/bin/bash

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

set -x
set -e

apt-get-noninteractive update

apt-get-noninteractive --no-install-recommends --yes install tb-updater tb-starter

set +x

## sets: boot_session
source /usr/libexec/helper-scripts/boot-session-detection.sh

if [ "$boot_session" = "sysmaint_session" ]; then
  printf '%s\n' "
------------------------------------------------------------------------------
Done installing tb-updater and tb-starter. Reboot into
\"PERSISTENT Mode | USER Session\", then launch \"Tor Browser (AnonDist)\"
from the application menu to download and run Tor Browser.
------------------------------------------------------------------------------
"
else
  printf '%s\n' "
------------------------------------------------------------------------------
INFO: Done installing tb-updater and tb-starter. Launch \"Tor Browser
(AnonDist)\" from the application menu to download and run Tor Browser.
------------------------------------------------------------------------------
"
fi
