add support for FreeBSD

This commit is contained in:
0x4D616E75
2022-12-19 16:18:38 +01:00
parent a1b8e65e37
commit 68a2b692f7
2 changed files with 11 additions and 0 deletions

View File

@@ -135,6 +135,8 @@ class OSConfig(metaclass = ABCMeta):
return LinuxConfig()
elif sys.platform == 'darwin':
return OSXConfig()
elif sys.platform.startswith('freebsd'):
return FreeBSDConfig()
else:
print(f'Non-supported platform: {sys.platform}')
return None
@@ -145,6 +147,14 @@ class OSConfig(metaclass = ABCMeta):
pass
class FreeBSDConfig(OSConfig):
''' FreeBSD-related config
'''
@property
def mktxp_user_dir_path(self):
return FSHelper.full_path('~/mktxp')
class OSXConfig(OSConfig):
''' OSX-related config
'''

View File

@@ -69,6 +69,7 @@ setup(
'Intended Audience :: System Administrators',
'Intended Audience :: Information Technology',
'Operating System :: MacOS',
'Operating System :: POSIX :: BSD :: FreeBSD',
'Operating System :: POSIX :: Linux',
'Topic :: System',
'Topic :: System :: Systems Administration',