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 /setup.py | |
| parent | 1a370a35d03227e413584d4a5dfb4ea5d93c39b2 (diff) | |
| download | texty-4e75bf11c541e6e152e32ceceabe45ca2309eda4.tar.xz texty-4e75bf11c541e6e152e32ceceabe45ca2309eda4.zip | |
feat: added configure option to generate config script
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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() |
