diff options
| author | Bobby <[email protected]> | 2022-11-05 11:47:24 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2022-11-05 11:47:24 -0400 |
| commit | 4e75bf11c541e6e152e32ceceabe45ca2309eda4 (patch) | |
| tree | 91ba1f66e1f3e60b1a64f9ebf6c951ee5c48292d | |
| parent | 1a370a35d03227e413584d4a5dfb4ea5d93c39b2 (diff) | |
| download | texty-4e75bf11c541e6e152e32ceceabe45ca2309eda4.tar.xz texty-4e75bf11c541e6e152e32ceceabe45ca2309eda4.zip | |
feat: added configure option to generate config script
| -rw-r--r-- | README.md | 5 | ||||
| -rw-r--r-- | setup.py | 16 |
2 files changed, 17 insertions, 4 deletions
@@ -66,6 +66,11 @@ This will activate the virtual environment. You can now install the project's de python3 setup.py install +To configure aliases at this point, run the following command: + + python3 setup.py configure + source bin/configure + This will install all the dependencies required to run the project. You can now start making changes. ### Committing Changes @@ -80,10 +80,9 @@ class Setup: else: logger.warn("Git author email not set.") - self.finish() + self.configure() - def finish(self): - logger.info("Setup finished.") + def configure(self): configure_path = "bin/configure" script = """#!{} alias commit="./commit.sh" @@ -101,7 +100,8 @@ echo "Run 'commit' to commit changes. Run 'commit -h' for help." configure_st = os.stat(configure_path) os.chmod(configure_path, configure_st.st_mode | 0o111) print( - """ + """Configuration script created. + You may want to configure aliases for commit and setup scripts. To do so, run the configurator binary: @@ -140,5 +140,13 @@ def install(): cli.add_command(install) [email protected](help="Generate alias configuration script.") +def configure(): + Setup().configure() + + +cli.add_command(configure) + + if __name__ == "__main__": cli() |
