libvirt_cloud/roles/toxcore/overlay/Linux/usr/local/bin/toxcore_clean_local.bash

33 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
# -*- mode: sh; fill-column: 75; tab-width: 8; coding: utf-8-unix -*-
# The idea here is to run ansible_local.bash --tags daily
# and then use this to do the parsing and throwing errors based on the output.
# This way the ansible run can be free from erroring and this can be
# run repeatedly anytime outside of ansible to deal with the issues raised.
# It is also run at the end of ansible_local.bash --tags daily to raise the issues.
prog=`basename $0 .bash`
PREFIX=/usr/local
ROLE=toxcore
[ -f /usr/local/etc/testforge/testforge.bash ] || \
. /usr/local/etc/testforge/testforge.bash
BASE_PYTHON3_MINOR=$( python3 --version 2>&1| sed -e 's@^.* @@' -e 's@\.[0-9]*$@@' )
. /usr/local/bin/usr_local_tput.bash
for from in /usr/lib/python$BASE_PYTHON3_MINOR/site-packages ; do
cd $from
ls */|grep -v '\.dist-info' | while read elt ; do
[ -d "$elt" ] || continue
[ "$elt" = __pycache__ ] && continue
base=`echo $elt|sed -e 's/-[0-9].*//'`
[ "$base" = py ] && continue
# DEBUG=1 DBUG $elt $base
ls -d $PREFIX/lib/python$BASE_PYTHON3_MINOR/site-packages/${base}* \
2>/dev/null && \
INFO $elt $PREFIX/lib/python$BASE_PYTHON3_MINOR/site-packages/${base}*
done
done