Skip to content

Instantly share code, notes, and snippets.

@xnumad
Created April 9, 2020 04:11
Show Gist options
  • Save xnumad/66c315922731aebab4d6680ba5ebf660 to your computer and use it in GitHub Desktop.
Save xnumad/66c315922731aebab4d6680ba5ebf660 to your computer and use it in GitHub Desktop.
lqxtcheck-V1 found at https://textuploader.com/1khof
#!/bin/bash
_fileloc=$HOME/lqxcheck #Where to keep the pkgs
_CHROOT=$HOME/chroot #Where do you want the chroot
_nproc=$(nproc) #How many threads to compile on
if [[ $EUID -ne 0 ]]; then
echo "Give me the root password:"
sudo echo "Thanks"
fi
mkdir $_fileloc
cd $_fileloc
if [ ! -f "/etc/systemd/system/lqxcheck.timer" ] || [ ! -f "/etc/systemd/system/lqxcheck.service" ] || [ ! -f "/usr/bin/lqxcheck.sh" ]; then
(
echo [Unit]
echo Description=Calls lqxcheck.service on boot and hourly
echo [Timer]
echo OnBootSec=5min
echo OnUnitActiveSec=60min
echo [Install]
echo WantedBy=timers.target
) > lqxcheck.timer
(
echo [Unit]
echo Description=Builds updated linux-lqx packages in a chroot and then packages the resulting kernel into linux-lqx-bin for AUR use
echo [Service]
echo ExecStart=usr/bin/lqxcheck
) > lqxcheck.service
sudo cp * /etc/systemd/system/
(
echo "#"!/bin/bash
echo cd $_fileloc
echo arch-nspawn $_CHROOT/root pacman -Syu
echo wget -O PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=linux-lqx
echo makechrootpkg -r $_CHROOT #excluded -c to make use of ccache and preload #-n
) > lqxcheck.sh
sudo cp lqxcheck.sh /usr/bin/lqxcheck.sh
rm *
if ! pacman -Qg base-devel devtools > /dev/null; then
sudo pacman -S base-devel devtools --needed
fi
mkdir $_CHROOT
sudo mkarchroot $_CHROOT/root base-devel ccache preload
sudo arch-nspawn $_CHROOT/root sed 's/"#"MAKEFLAGS=-j1/MAKEFLAGS=-j$(_nproc)/g' /etc/makepkg.conf && sed 's/BUILDENV=(!distcc color !ccache check !sign)/BUILDENV=(!distcc color ccache check !sign)/g' /etc/makepkg.conf && sed 's/COMPRESSXZ="(xz -c -z -)"/COMPRESSXZ="(xz -c -z - --threads=0)"/g' /etc/makepkg.conf && systemctl enable --now preload
sudo systemctl enable --now lqxcheck.timer
fi
@xnumad
Copy link
Author

xnumad commented Feb 19, 2021

Official binaries of linux-lqx, linux-lqx-headers, and linux-lqx-docs are now available: https://wiki.archlinux.org/index.php/Unofficial_user_repositories#liquorix

Signing key import instructions: sudo pacman-key --keyserver hkps.pool.sks-keyservers.net --recv-keys 9AE4078033F8024D && sudo pacman-key --lsign-key 9AE4078033F8024D

https://aur.archlinux.org/packages/linux-lqx/#pinned-763286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment