File: vng

package info (click to toggle)
virtme-ng 1.35-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 540 kB
  • sloc: python: 4,310; sh: 483; makefile: 31
file content (25 lines) | stat: -rwxr-xr-x 684 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python3
# -*- mode: python -*-
# vng: The main command-line virtme-ng frontend

# This file is not installed; it's just use to run virtme-ng from inside a
# source distribution.

import os
import sys

os.environ["__VNG_LOCAL"] = "1"
from virtme_ng import run  # noqa: E402


# Update PATH to make sure that virtme-ng can be executed directly from the
# source directory, without necessarily installing virtme-ng in the system.
def update_path():
    script_dir = os.path.dirname(os.path.abspath(__file__))
    current_path = os.environ.get("PATH", "")
    new_path = f"{script_dir}:{current_path}"
    os.environ["PATH"] = new_path


update_path()
sys.exit(run.main())