particle-os-modules/modules/bling/installers/laptop.sh
Nick Saika 17bacbe3da
fix: Fix flag ordering in set calls in scripts (#99)
The README for scripts has an incorrect use of the `set`. Where it says
to use:

	set -oue pipefail

it should be:

	set -euo pipefail

since `pipefail` is an option consumed by `set -o`.

More information: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
2024-01-16 06:12:08 +00:00

20 lines
854 B
Bash

#!/usr/bin/env bash
# Tell build process to exit if there are any errors.
set -euo pipefail
wget "https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-$(rpm -E %fedora)/ublue-os-staging-fedora-$(rpm -E %fedora).repo" \
-O "/etc/yum.repos.d/_copr_ublue-os_staging.repo"
if rpm -qa | grep power-profiles-daemon ; then
rpm-ostree override remove power-profiles-daemon --install=fprintd --install=tlp --install=tlp-rdw
else
rpm-ostree install fprintd tlp tlp-rdw
fi
systemctl enable tlp
systemctl enable fprintd
mkdir -p /usr/etc/tlp.d
mkdir -p /usr/share/ublue-os/just/bling/
cp -r "$BLING_DIRECTORY"/files/laptop/usr/etc/tlp.d/* /usr/etc/tlp.d/
cp -r "$BLING_DIRECTORY"/files/laptop/usr/share/ublue-os/just/bling/* /usr/share/ublue-os/just/bling/
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ublue-os_staging.repo