linkchanbot

Telegram bot frontend proxy link substituter
Log | Files | Refs | README | LICENSE

commit 3698bf0a00b484426cc5daaece6858f49ede7878
parent b8811bb5843877fcef58107e9107a3668a6d8ff8
Author: Byron Torres <b@torresjrjr.com>
Date:   Mon, 29 Mar 2021 18:45:50 +0100

Change system share dir; Fix f-string

System share directory for linkchan changed from
    /usr/local/share/linkchanbot
to
    /usr/local/share/linkchan

This should not be a breaking change. Otherwise, simply reinstall.

Diffstat:
MMakefile | 2+-
Mlinkchanbot | 7++++---
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -7,7 +7,7 @@ VERSION=0.0.0 PREFIX?=/usr/local BINDIR?=$(PREFIX)/bin -SHAREDIR?=$(PREFIX)/share/linkchanbot +SHAREDIR?=$(PREFIX)/share/linkchan MANDIR?=$(PREFIX)/share/man VPATH=doc diff --git a/linkchanbot b/linkchanbot @@ -106,7 +106,8 @@ def init(args): config_home = pathlib.Path(os.getenv('XDG_CONFIG_HOME', os.getenv('HOME') + '/.config')) config_dir = config_home/'linkchan' config_dir.mkdir(parents=True, exist_ok=True) # EFFECT - sys_config_dir = pathlib.Path('/usr/local/share/linkchanbot') + + sys_share_dir = pathlib.Path('/usr/local/share/linkchan') config_files = ('bot.cfg', 'alts.json', 'services.json', 'queries.json') @@ -114,7 +115,7 @@ def init(args): # Fail if files not found. for file in config_files: locfile = config_dir/file - sysfile = sys_config_dir/file + sysfile = sys_share_dir/file if locfile.is_file(): continue @@ -124,7 +125,7 @@ def init(args): else: stderr( f"Error: config file '{file}' not found in" - "'{config_dir}' or '{sys_config_dir}'", + f"'{config_dir}' or '{sys_share_dir}'", ) exit(1)