Fixes:b05eb4eb6d("build: Allow disabling the X11 session") Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/400> (cherry picked from commit2552c92fe1)
25 lines
709 B
Python
Executable File
25 lines
709 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
# SPDX-FileCopyrightText: 2021 Neal Gompa <ngompa@fedoraproject.org>
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
import os
|
|
import shutil
|
|
import sys
|
|
|
|
if os.environ.get('DESTDIR'):
|
|
install_root = os.environ.get('DESTDIR') + os.path.abspath(sys.argv[1])
|
|
else:
|
|
install_root = sys.argv[1]
|
|
|
|
# FIXME: Meson is unable to copy a generated target file:
|
|
# https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0
|
|
dst_dir = os.path.join(install_root, 'xsessions')
|
|
if not os.path.exists(dst_dir):
|
|
os.makedirs(dst_dir)
|
|
|
|
src = os.path.join(install_root, 'wayland-sessions', 'gnome-classic.desktop')
|
|
dst = os.path.join(dst_dir, 'gnome-classic.desktop')
|
|
shutil.copyfile(src, dst)
|