From f09d885e7ccd0c1d9024370d30fcfbab356df222 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Mon, 17 Jan 2022 08:31:56 +0100 Subject: [PATCH] bin update --- apt-extend-ubuntu | 10 ++++++++-- findrepos | 39 +++++++++++++++++++++++++++++++++++++++ requirements.txt | 2 ++ unittest_status | 3 ++- 4 files changed, 51 insertions(+), 3 deletions(-) create mode 100755 findrepos create mode 100644 requirements.txt diff --git a/apt-extend-ubuntu b/apt-extend-ubuntu index 36a6a21..9f5619d 100755 --- a/apt-extend-ubuntu +++ b/apt-extend-ubuntu @@ -8,17 +8,22 @@ joe git tmux synaptic neofetch sshfs curlftpfs libneon27 +openssh-server +nfs-kernel-server keepass2 xdotool tlp tlp-rdw lib32stdc++6 -powerline powerline-gitstatus +powerline powerline-gitstatus fonts-powerline +gnome-tweaks chrome-gnome-shell caffeine " MULTIMEDIA=" kodi kodi-pvr-hts ubuntu-restricted-extras libdvd-pkg -ardour ubuntustudio-controls calf-plugins eq10q fluid-soundfont-gm fluid-soundfont-gs lame +ardour ubuntustudio-controls calf-plugins eq10q fluid-soundfont-gm fluid-soundfont-gs guitarix-ladspa swh-plugins +gxtuner +lame " @@ -34,6 +39,7 @@ openscad freecad PROGRAMMING=" arduino +minicom virtualenv libgtk-3-dev python3-pip diff --git a/findrepos b/findrepos new file mode 100755 index 0000000..96e8157 --- /dev/null +++ b/findrepos @@ -0,0 +1,39 @@ +#!/home/dirk/bin/venv/bin/python +# -*- coding: UTF-8 -*- + +import optparse +import os + +repolist = [] + + +def findrepos(p, **kwargs): + depth = kwargs.get('depth', 0) + max_depth = kwargs.get('max_depth') + ld = os.listdir(p) + if '.git' in ld: + if os.path.isdir(os.path.join(p, '.git')): + repolist.append(p) + return + else: + for entry in ld: + np = os.path.join(p, entry) + if os.path.isdir(np): + findrepos(np, depth=depth+1, max_depth=max_depth) + + +if __name__ == "__main__": + parser = optparse.OptionParser("usage: %%prog target_path [opions]") + parser.add_option("-d", "--depth", dest="depth", default=None, type="int", help="Folder depth to search for a repo") + parser.add_option("-p", "--human-readable", dest="human_readable", action="store_true", default=False, help="Print a human readable list") + (options, args) = parser.parse_args() + + if len(args) != 1: + parser.print_help() + else: + findrepos(args[0]) + repolist.sort() + if options.human_readable: + print('- ' + '\n- '.join(repolist), '\n') + else: + print(' '.join(repolist)) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..566f33b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +jinja2 +distro diff --git a/unittest_status b/unittest_status index c31dbd4..a979084 100755 --- a/unittest_status +++ b/unittest_status @@ -14,4 +14,5 @@ module_pathes = fstools.dirlist(MY_PATH, rekursive=False) module_pathes.sort() sys.stdout.write(unittest.module_status.module_status_head()) for module_path in module_pathes: - sys.stdout.write(unittest.module_status.module_status_line(module_path)) + if not os.path.basename(module_path) in ['.git', 'eclipse-workspace']: + sys.stdout.write(unittest.module_status.module_status_line(module_path))