import os
import shutil
import sys
def setup_bellos():
bellos_executable = "executable/bellos"
usr_local_bin = "/usr/local/bin/bellos"
if not os.path.exists(bellos_executable):
print(f"Error: {bellos_executable} not found.")
return
try:
shutil.copy2(bellos_executable, usr_local_bin)
os.chmod(usr_local_bin, 0o755) print(f"Bellos has been copied to {usr_local_bin}")
except IOError as e:
print(f"Error copying file: {e}")
return
print("Bellos has been set up successfully.")
if __name__ == "__main__":
if os.geteuid() != 0:
print("This script must be run with sudo privileges.")
sys.exit(1)
setup_bellos()