gamemode/bootstrap.sh
Ikey Doherty 1328e07f86 Split meson up to be more modular
This also explicitly constructs reusable library components to make it
easier to extend the project over time. Notably we make less assumptions
about the host system and use pkgconfig where appropriate to give us
system details, such as the systemd system unit directory for packaging.
This can be overriden with the meson option.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
2018-03-05 17:32:01 +00:00

29 lines
581 B
Bash
Executable File

#!/bin/bash
# Simple bootstrap script to build and run the daemon
set -e
# Echo the rest so it's obvious
set -x
meson --prefix=/usr build -Dwith-systemd-user-unit-dir=/etc/systemd/user
cd build
ninja
# Verify user wants to install
set +x
read -p "Install to /usr? [Yy] " -r
[[ $REPLY =~ ^[Yy]$ ]]
set -x
sudo ninja install
# Verify user wants to run the daemon
set +x
read -p "Enable and run the daemon? [Yy] " -r
[[ $REPLY =~ ^[Yy]$ ]]
set -x
systemctl --user daemon-reload
systemctl --user enable gamemoded
systemctl --user start gamemoded
systemctl --user status gamemoded