grub-btrfs: remove root requirement

This commit is contained in:
Đoàn Trần Công Danh 2021-04-14 19:26:58 +07:00
parent 360affa77d
commit f01490cac7
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,15 @@
Index: grub-btrfs-4.9/Makefile
===================================================================
--- grub-btrfs-4.9.orig/Makefile
+++ grub-btrfs-4.9/Makefile
@@ -9,10 +9,6 @@ LIB_DIR = $(DESTDIR)$(PREFIX)/lib
.PHONY: install uninstall help
install:
- @if test "$(shell id -u)" != 0; then \
- echo "You are not root, run this target as root please."; \
- exit 1; \
- fi
@install -Dm755 -t "$(DESTDIR)/etc/grub.d/" 41_snapshots-btrfs
@install -Dm644 -t "$(DESTDIR)/etc/default/grub-btrfs/" config
@install -Dm644 -t "$(LIB_DIR)/systemd/system/" grub-btrfs.service

View File

@ -10,6 +10,7 @@ license="GPL-3.0-or-later"
homepage="https://github.com/Antynea/grub-btrfs"
distfiles="https://github.com/Antynea/grub-btrfs/archive/v${version}.tar.gz"
checksum=62461133c697643e98a608239773f500edee3e4055c5729fef6639d1cd610243
patch_args=-Np1
post_install() {
rm -rf -- "${DESTDIR}"/usr/lib/systemd