mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-11 18:41:11 +01:00
- Replace os.rename() with os.replace() for atomic file operations on Windows (os.rename fails if destination exists on Windows) - Add entry_points console_scripts for proper .exe generation on Windows - Create github_backup/cli.py with main() entry point - Add github_backup/__main__.py for python -m github_backup support - Keep bin/github-backup as thin wrapper for backwards compatibility Closes #112
23 lines
533 B
Python
Executable File
23 lines
533 B
Python
Executable File
#!/usr/bin/env python
|
|
"""
|
|
Backwards-compatible wrapper script.
|
|
|
|
The recommended way to run github-backup is via the installed command
|
|
(pip install github-backup) or python -m github_backup.
|
|
|
|
This script is kept for backwards compatibility with existing installations
|
|
that may reference this path directly.
|
|
"""
|
|
|
|
import sys
|
|
|
|
from github_backup.cli import main
|
|
from github_backup.github_backup import logger
|
|
|
|
if __name__ == "__main__":
|
|
try:
|
|
main()
|
|
except Exception as e:
|
|
logger.error(str(e))
|
|
sys.exit(1)
|