mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
revng2: allow execution in build directory
Change the logic in `python/scripts/revng` to allow executing it as `revng2`. This allows running `revng2` in the build directory.
This commit is contained in:
@@ -20,6 +20,11 @@ if str(new_path) not in sys.path:
|
||||
sys.path.insert(0, str(new_path))
|
||||
|
||||
if __name__ == "__main__":
|
||||
from revng.internal.cli.revng import main
|
||||
name = os.path.basename(sys.argv[0])
|
||||
assert name in ("revng", "revng2")
|
||||
if name == "revng":
|
||||
from revng.internal.cli.revng import main
|
||||
else:
|
||||
from revng.internal.cli.revng2 import main
|
||||
|
||||
sys.exit(main())
|
||||
|
||||
Reference in New Issue
Block a user