1
0

bootstrap.sh 581 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. # Simple bootstrap script to build and run the daemon
  3. set -e
  4. # Echo the rest so it's obvious
  5. set -x
  6. meson --prefix=/usr build -Dwith-systemd-user-unit-dir=/etc/systemd/user
  7. cd build
  8. ninja
  9. # Verify user wants to install
  10. set +x
  11. read -p "Install to /usr? [Yy] " -r
  12. [[ $REPLY =~ ^[Yy]$ ]]
  13. set -x
  14. sudo ninja install
  15. # Verify user wants to run the daemon
  16. set +x
  17. read -p "Enable and run the daemon? [Yy] " -r
  18. [[ $REPLY =~ ^[Yy]$ ]]
  19. set -x
  20. systemctl --user daemon-reload
  21. systemctl --user enable gamemoded
  22. systemctl --user start gamemoded
  23. systemctl --user status gamemoded