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

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