From f42af91a19d16f36d2a7ea2e8622252cf7d211b0 Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 3 Sep 2021 11:04:48 +0200 Subject: Restructure Code --- archlinux/PKGBUILD | 4 ---- src/scripts/xbackup | 7 ++----- src/xbackup/script.py | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 src/xbackup/script.py diff --git a/archlinux/PKGBUILD b/archlinux/PKGBUILD index b77f4e0..923e25d 100644 --- a/archlinux/PKGBUILD +++ b/archlinux/PKGBUILD @@ -31,10 +31,6 @@ build() { make all } -#check() { -# make -k check -#} - package() { cd ${pkgname} make DESTDIR="${pkgdir}" install diff --git a/src/scripts/xbackup b/src/scripts/xbackup index 0155203..69246ea 100644 --- a/src/scripts/xbackup +++ b/src/scripts/xbackup @@ -8,16 +8,13 @@ Have a look at https://gitea.xengineering.eu/xengineering/xbackup for details. """ -import argparse - -import xbackup +from xbackup import script def main(): """Main Function of this Script""" - parser = argparse.ArgumentParser() - parser.parse_args() + script.run() if __name__ == "__main__": diff --git a/src/xbackup/script.py b/src/xbackup/script.py new file mode 100644 index 0000000..198b6b3 --- /dev/null +++ b/src/xbackup/script.py @@ -0,0 +1,15 @@ +#!/usr/bin/python3 +# vim: shiftwidth=4 tabstop=4 expandtab + + +"""Module for the Script Functionality of xbackup""" + + +import argparse + + +def run(): + """runs xbackup script functionality""" + + parser = argparse.ArgumentParser() + parser.parse_args() -- cgit v1.2.3-70-g09d2