osbuid: introduce libdir
Run stages and the runner from a libdir, which is either $prefix/lib or the current directory.
This commit is contained in:
parent
48f8a7fc2a
commit
e7b8f757d4
1 changed files with 8 additions and 2 deletions
10
osbuild
10
osbuild
|
|
@ -8,6 +8,12 @@ import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
|
||||||
|
if os.path.dirname(__file__) == f"{sys.prefix}/bin":
|
||||||
|
libdir = f"{sys.prefix}/lib"
|
||||||
|
else:
|
||||||
|
libdir = os.path.abspath(".")
|
||||||
|
|
||||||
|
|
||||||
RESET = "\033[0m"
|
RESET = "\033[0m"
|
||||||
BOLD = "\033[1m"
|
BOLD = "\033[1m"
|
||||||
RED = "\033[31m"
|
RED = "\033[31m"
|
||||||
|
|
@ -69,8 +75,8 @@ class BuildRoot:
|
||||||
}
|
}
|
||||||
|
|
||||||
binds = [
|
binds = [
|
||||||
(f"{os.getcwd()}/run-stage", "/tmp/run-stage"),
|
(f"{libdir}/run-stage", "/tmp/run-stage"),
|
||||||
(f"{os.getcwd()}/stages/{stage}", "/tmp/stage"),
|
(f"{libdir}/stages/{stage}", "/tmp/stage"),
|
||||||
("/etc/pki", "/etc/pki")
|
("/etc/pki", "/etc/pki")
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue