|
|
|
@ -1,7 +1,9 @@ |
|
|
|
from argparse import ArgumentParser |
|
|
|
from pathlib import Path |
|
|
|
|
|
|
|
from tibi_hardlinks.config import CONFIG_DATA |
|
|
|
import yaml |
|
|
|
|
|
|
|
from tibi_hardlinks.config import CONFIG_DATA, CONFIG_FILE_PATH |
|
|
|
from tibi_hardlinks.backups import Backup, create_backup_directory_name |
|
|
|
|
|
|
|
|
|
|
|
@ -27,5 +29,10 @@ def hardlink_all_files(files, dry=False): |
|
|
|
def main(): |
|
|
|
parser = ArgumentParser() |
|
|
|
parser.add_argument("-d", "--dry", action="store_true", help="Don't do anything") |
|
|
|
parser.add_argument("--dump-config", action="store_true", help="Show config") |
|
|
|
args = parser.parse_args() |
|
|
|
if args.dump_config: |
|
|
|
print(CONFIG_FILE_PATH) |
|
|
|
print(yaml.dump(CONFIG_DATA)) |
|
|
|
exit(0) |
|
|
|
hardlink_all_files(find_all_property_files(), args.dry) |