summaryrefslogtreecommitdiff
path: root/conf.d
diff options
context:
space:
mode:
Diffstat (limited to 'conf.d')
-rw-r--r--conf.d/link_confs.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/conf.d/link_confs.py b/conf.d/link_confs.py
index e195095..52b8093 100644
--- a/conf.d/link_confs.py
+++ b/conf.d/link_confs.py
@@ -12,7 +12,14 @@ if __name__=='__main__':
parser.add_argument('links', nargs='+')
args = parser.parse_args()
- confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath)
+ if os.path.isabs(args.confpath):
+ destdir = os.environ.get('DESTDIR')
+ if destdir:
+ confpath = os.path.join(destdir, args.confpath[1:])
+ else:
+ confpath = args.confpath
+ else:
+ confpath = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.confpath)
if not os.path.exists(confpath):
os.makedirs(confpath)