Add aisbf.sh to data_files for pip package distribution

- Added aisbf.sh to data_files so it's included in pip package
- Updated _install_aisbf_script to copy from share directory instead of source
- This ensures aisbf.sh is available when installing from pip
parent f421664b
......@@ -60,15 +60,17 @@ class InstallCommand(_install):
if '--user' in sys.argv or os.geteuid() != 0:
# User installation - use ~/.local/bin
bin_dir = Path.home() / '.local' / 'bin'
share_dir = Path.home() / '.local' / 'share' / 'aisbf'
else:
# System installation - use /usr/local/bin
bin_dir = Path('/usr/local/bin')
share_dir = Path('/usr/share/aisbf')
# Create the bin directory if it doesn't exist
bin_dir.mkdir(parents=True, exist_ok=True)
# Copy the existing aisbf.sh script to the bin directory
src = Path(__file__).parent / 'aisbf.sh'
# Copy the aisbf.sh script from the share directory to the bin directory
src = share_dir / 'aisbf.sh'
dst = bin_dir / 'aisbf'
# Copy the script
......@@ -113,6 +115,7 @@ setup(
('share/aisbf', [
'main.py',
'requirements.txt',
'aisbf.sh',
'config/providers.json',
'config/rotations.json',
'config/autoselect.json',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment