#!/bin/bash

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

#### meta start
#### project Whonix
#### category tor and usability
#### description
#### gateway_only yes
## Tor apt sources and version info command line tool.
#### meta end

if [ ! -e /etc/apt/sources.list.d/torproject.list ]; then
   echo "INFO: /etc/apt/sources.list.d/torproject.list does not exist."
else
   uncommented_lines="$(cat /etc/apt/sources.list.d/torproject.list | grep -v '#' | grep deb)"
   echo "INFO: /etc/apt/sources.list.d/torproject.list uncommented lines:
$uncommented_lines"
fi

tor_version="$(dpkg-query --show --showformat='${Version}' "tor")"
echo "INFO: version of the 'tor' package: $tor_version"
