ros2nix/test/ros2nix
2025-02-10 08:39:10 +01:00

19 lines
520 B
Python
Executable file

#!/usr/bin/env python3
# Script for easy testing of ros2nix during development, i.e., without
# installation. You can add the directory of this script to PATH and
# run ros2nix command.
import sys
import re
from pathlib import Path
if __name__ == '__main__' and __package__ is None:
file = Path(__file__).resolve()
sys.path.append(str(file.parents[1]))
from ros2nix.ros2nix import main
sys.argv[0] = __file__
sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
sys.exit(main())