From c9351b907a11dfbe5c3c852948d3415d6d933cfb Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 3 Nov 2023 14:15:42 +0000 Subject: [PATCH] feat: add Garuda routine (#98) * feat: add Garuda routine * style: comply to Prettier --- Makefile | 2 ++ src/lib/routines-garuda.sh | 18 ++++++++++++++++++ src/lib/routines.sh | 4 ++++ 3 files changed, 24 insertions(+) create mode 100755 src/lib/routines-garuda.sh diff --git a/Makefile b/Makefile index 908b600..0a82470 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ LIBS = \ package-prepare \ pkgrel-incrementer \ routines \ + routines-garuda \ routines-tkg \ routines-tkg-wine \ sync \ @@ -26,6 +27,7 @@ ROUTINES = \ afternoon \ nightly \ midnight \ + garuda \ tkg-kernels \ tkg-wine diff --git a/src/lib/routines-garuda.sh b/src/lib/routines-garuda.sh new file mode 100755 index 0000000..09ecec6 --- /dev/null +++ b/src/lib/routines-garuda.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +function routine-garuda() { + set -euo pipefail + clean-xdg + interfere-sync + push-routine-dir 'garuda' + + [[ -d "_repo" ]] && rm -rf --one-file-system '_repo' + git clone 'https://gitlab.com/garuda-linux/pkgbuilds.git' '_repo' + mv _repo/* . + + (makepwd) || true + + clean-logs + popd #routine-dir + return 0 +} diff --git a/src/lib/routines.sh b/src/lib/routines.sh index 808b9a3..336ae6d 100755 --- a/src/lib/routines.sh +++ b/src/lib/routines.sh @@ -14,6 +14,10 @@ function routine() { export CAUR_IN_ROUTINE case "${_CMD}" in + 'garuda') + load-config 'routines/garuda' + routine-garuda + ;; 'tkg-kernels') load-config 'routines/tkg-kernels' routine-tkg-kernels