<commit_before>#!/bin/bash
#-e Causes bash script to exit if any of the installers
#return with a non-zero return value.

if [[ $EUID -ne 0 ]]; then
    echo "Please run as root user."
    exit 1
fi

########################################################################
# Complete list of files that we need to remove is available in
# airtime-copy-files.sh
#######################################################################


# Absolute path to this script, e.g. /home/user/bin/foo.sh
SCRIPT=`readlink -f $0`
# Absolute path this script is in, thus /home/user/bin
SCRIPTPATH=`dirname $SCRIPT`

AIRTIMEROOT=$SCRIPTPATH/../../

#rm -f /etc/airtime/airtime.conf
#rm -f /etc/airtime/api_client.cfg
#rm -f /etc/airtime/recorder.cfg
#rm -f /etc/airtime/media-monitor.cfg
#rm -f /etc/airtime/pypo.cfg
#rm -f /etc/airtime/liquidsoap.cfg

rm -f /etc/cron.d/airtime-crons

#virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
#. ${virtualenv_bin}activate

echo "* API Client"
python $AIRTIMEROOT/python_apps/api_clients/install/api_client_uninstall.py
echo "* Pypo"
python $AIRTIMEROOT/python_apps/pypo/install/pypo-remove-files.py
echo "* Media-Monitor"
python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-remove-files.py
#echo "* Show-Recorder"
#python $AIRTIMEROOT/python_apps/show-recorder/install/recorder-remove-files.py

#remove symlinks
rm -f /usr/bin/airtime-import
rm -f /usr/bin/airtime-update-db-settings
rm -f /usr/bin/airtime-check-system
rm -f /usr/bin/airtime-log
rm -f /usr/bin/airtime-test-soundcard
rm -f /usr/bin/airtime-test-stream

rm -rf /usr/lib/airtime
rm -rf /usr/share/airtime
<commit_msg>CC-5005: airtime-purge doesn't remove all files<commit_after>#!/bin/bash
#-e Causes bash script to exit if any of the installers
#return with a non-zero return value.

if [[ $EUID -ne 0 ]]; then
    echo "Please run as root user."
    exit 1
fi

########################################################################
# Complete list of files that we need to remove is available in
# airtime-copy-files.sh
#######################################################################


# Absolute path to this script, e.g. /home/user/bin/foo.sh
SCRIPT=`readlink -f $0`
# Absolute path this script is in, thus /home/user/bin
SCRIPTPATH=`dirname $SCRIPT`

AIRTIMEROOT=$SCRIPTPATH/../../

#rm -f /etc/airtime/airtime.conf
#rm -f /etc/airtime/api_client.cfg
#rm -f /etc/airtime/recorder.cfg
#rm -f /etc/airtime/media-monitor.cfg
#rm -f /etc/airtime/pypo.cfg
#rm -f /etc/airtime/liquidsoap.cfg

rm -f /etc/cron.d/airtime-crons

#virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
#. ${virtualenv_bin}activate

echo "* API Client"
python $AIRTIMEROOT/python_apps/api_clients/install/api_client_uninstall.py
echo "* Pypo"
python $AIRTIMEROOT/python_apps/pypo/install/pypo-remove-files.py
echo "* Media-Monitor"
python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-remove-files.py
#echo "* Show-Recorder"
#python $AIRTIMEROOT/python_apps/show-recorder/install/recorder-remove-files.py

#remove symlinks
rm -f /usr/bin/airtime-import
rm -f /usr/bin/airtime-update-db-settings
rm -f /usr/bin/airtime-check-system
rm -f /usr/bin/airtime-log
rm -f /usr/bin/airtime-test-soundcard
rm -f /usr/bin/airtime-test-stream
rm -f /usr/bin/airtime-silan

rm -rf /usr/lib/airtime
rm -rf /usr/share/airtime

{'fraction_non_alphanumeric': 0.2142643092598142, 'fraction_numerical': 0.0029967036260113876, 'mean_word_length': 4.248427672955975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4034975', 'n_tokens_mistral': 1238, 'n_tokens_neox': 1202, 'n_words': 272}