#!/bin/bash

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

set -e
set -x

mydir="$( cd "$( dirname "$0" )" && pwd )"
cd "$mydir"
cd ..
cd ..
cd ..

source ./usr/libexec/tb-updater/version-validator

####

RecommendedTBBVersions="./usr/share/tb-updater/unit-test/RecommendedTBBVersions"
test -f "$RecommendedTBBVersions"

tbbversion

if [ "$tbb_version" = "10.0.6" ]; then
   true "$0: INFO: OK"
else
   echo "$0: tbb_version: $tbb_version"
   echo "$0: ERROR 1!"
   exit 1
fi

####

RecommendedTBBVersions="./usr/share/tb-updater/unit-test/RecommendedTBBVersions2"
test -f "$RecommendedTBBVersions"

tbbversion

if [ "$tbb_version" = "UNKNOWN" ]; then
   true "$0: INFO: OK"
else
   echo "$0: tbb_version: $tbb_version"
   echo "$0: ERROR 2!"
   exit 1
fi

####

true "$0: INFO: OK"
