mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-07 05:25:25 +00:00
16 lines
288 B
Python
16 lines
288 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
import os
|
||
|
import sys
|
||
|
|
||
|
destdir = os.environ.get('DESTDIR', os.sep)
|
||
|
dirname = sys.argv[1]
|
||
|
target = sys.argv[2]
|
||
|
link = sys.argv[3]
|
||
|
|
||
|
workdir = os.path.join(destdir, dirname.strip(os.sep))
|
||
|
|
||
|
os.makedirs(workdir, exist_ok=True)
|
||
|
os.chdir(workdir)
|
||
|
os.symlink(target, link)
|