\! -exec git check-ignore -q {} \; -print | \
sed -e "s@$(abs_srcdir)/@@g" | LC_ALL=C sort > $@
+dist_bin_SCRIPTS = \
+ src/bricklayer
+
dist_pkgpython_PYTHON = \
- src/python/__init__.py
+ src/python/__init__.py \
+ src/python/i18n.py
--- /dev/null
+#!/usr/bin/python3
+###############################################################################
+# #
+# Bricklayer - An Installer for IPFire #
+# Copyright (C) 2021 IPFire Development Team #
+# #
+# This program is free software; you can redistribute it and/or #
+# modify it under the terms of the GNU General Public License #
+# as published by the Free Software Foundation; either version 2 #
+# of the License, or (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+import argparse
+import logging
+import sys
+
+import bricklayer
+
+from bricklayer.i18n import _
+
+# Setup logging
+log = logging.getLogger("bricklayer")
+
+class Cli(object):
+ """
+ This class is called from the command line interface and parses any
+ relevant switches and configures bricklayer.
+ """
+ def parse_cli(self):
+ parser = argparse.ArgumentParser(
+ description=_("IPFire Installation Tool CLI"),
+ )
+ parser.add_argument("--debug", action="store_true",
+ help=_("Enable debugging mode"))
+ parser.add_argument("--test", action="store_true",
+ help=_("Enable test mode (do not perform any actions)"))
+
+ # Parse arguments
+ return parser.parse_args()
+
+ def __call__(self):
+ # Parse command line arguments
+ args = self.parse_cli()
+
+ # Run bricklayer
+ r = self.run_bricklayer(args)
+
+ if r:
+ sys.exit(r)
+
+ def run_bricklayer(self, args):
+ # Setup bricklayer
+ bl = bricklayer.Bricklayer()
+
+ # Run it
+ return bl()
+
+
+# Main
+c = Cli()
+c()
+###############################################################################
+# #
+# Bricklayer - An Installer for IPFire #
+# Copyright (C) 2021 IPFire Development Team #
+# #
+# This program is free software; you can redistribute it and/or #
+# modify it under the terms of the GNU General Public License #
+# as published by the Free Software Foundation; either version 2 #
+# of the License, or (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+class Bricklayer(object):
+ """
+ Bricklayer's base class
+ """
+ def __init__(self):
+ pass
+
+ def __call__(self):
+ pass
--- /dev/null
+###############################################################################
+# #
+# Bricklayer - An Installer for IPFire #
+# Copyright (C) 2021 IPFire Development Team #
+# #
+# This program is free software; you can redistribute it and/or #
+# modify it under the terms of the GNU General Public License #
+# as published by the Free Software Foundation; either version 2 #
+# of the License, or (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+import gettext
+
+def _(singular, plural=None, n=None):
+ if plural:
+ return gettext.dngettext("bricklayer", singular, plural, n)
+
+ return gettext.dgettext("bricklayer", singular)